@lornatang/dsh-atlassian 0.1.16 → 0.1.18

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.18 - 2026-11-23
4
+
5
+ - Use host authentication for connector routes. Requires DeepSeek Harness 0.2.3-alpha.2 or newer.
6
+
7
+ ## 0.1.17 - 2026-11-23
8
+
9
+ - Validate connector tool output in a worker and enforce limits on discovered tools and returned data.
10
+ - Clean up the connector and its registered tools if initialization fails.
11
+ - Publish from the shared repository using npm Trusted Publishing.
12
+
3
13
  ## 0.1.16 - 2026-11-21
4
14
 
5
15
  - Move the source and release metadata to the shared dsh-plugin repository.
package/LICENSE CHANGED
@@ -1,202 +1,202 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright [yyyy] [name of copyright owner]
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE CHANGED
@@ -1,2 +1,2 @@
1
- DSH Atlassian
2
- Copyright 2026 Lornatang
1
+ DSH Atlassian
2
+ Copyright 2026 Lornatang
package/README.md CHANGED
@@ -11,6 +11,8 @@ English | [中文](README.zh.md)
11
11
 
12
12
  `dsh-atlassian` connects a dsh profile to Atlassian Cloud or a self-hosted Jira and Confluence pair. Cloud mode holds an OAuth 2.1 session with the Atlassian remote MCP server and registers the tools it advertises for agent sessions; server mode registers a fixed REST tool set. It adds an Atlassian settings section and a Jira board panel to the Web client. Add or remove it with `dsh plugin --profile <name> add|remove @lornatang/dsh-atlassian`. The boundary: one connection per row, unencrypted credentials under the profile data directory, and a loopback OAuth callback.
13
13
 
14
+ Requires DeepSeek Harness `0.2.3-alpha.2` or later.
15
+
14
16
  ## Table of Contents
15
17
 
16
18
  - [Use this package](#use-this-package)
@@ -56,7 +58,7 @@ The client half adds three rows, all owned and rendered by this package inside s
56
58
  - `sidebar.panellist`, id `jira-board`, order 40, label `Jira` — the sidebar icon that opens the board.
57
59
  - `main`, key `jira-board` — the board itself: search, project filter, JQL form, one column per issue status, issue detail with transition buttons, and Send to current session / Send to new session / Copy prompt.
58
60
 
59
- The routes behind those rows live at the fixed prefix `/plugins/atlassian` (`status`, `configure`, `connect`, `disconnect`, `debug-tools`, `board`, `projects`, `transition`, `issue/<key>`, `issue/<key>/transitions`). They answer only when the DSH `connection` service is present and its request fence admits the request; without the service the routes return 503.
61
+ The routes behind those rows live at the fixed prefix `/plugins/atlassian` (`status`, `configure`, `connect`, `disconnect`, `debug-tools`, `board`, `projects`, `transition`, `issue/<key>`, `issue/<key>/transitions`). These routes require an authenticated DSH peer.
60
62
 
61
63
  ### Configuration
62
64
 
@@ -107,7 +109,7 @@ Service URLs go through the same validation when they are saved in Settings: the
107
109
 
108
110
  The layer is a single patch row: an `insert` of `atlassian` carrying the Cloud defaults. The patch has no platform gate; the client half is declared in `package.json` (`dsh.client.platform: web`, with the two slot packages injected), so a headless profile loads the host half only and the settings and board rows appear in a Web profile.
109
111
 
110
- `apply` selects the bridge from `mode` — `AtlassianBridge` for Cloud, `ServerBridge` for self-hosted — derives the credential identity (the configured URL for Cloud, `server:<jiraUrl>` and `<confluenceUrl>` joined by a NUL for self-hosted), builds a `SessionStore` for `sessionFileFor(serverName, identity, patchPath)`, creates the board, and registers the routes against `webServer` or `httpServer`. Every route sits behind the `connection` service's request fence; when the service appears after the plugin, an `internal/service` listener re-binds the routes. `void bridge.start()` runs in the background and logs failures.
112
+ `apply` selects the bridge from `mode` — `AtlassianBridge` for Cloud, `ServerBridge` for self-hosted — derives the credential identity (the configured URL for Cloud, `server:<jiraUrl>` and `<confluenceUrl>` joined by a NUL for self-hosted), builds a `SessionStore` for `sessionFileFor(serverName, identity, patchPath)`, creates the board, and registers authenticated routes on `webServer`. An `internal/service` listener updates the bindings when the web service changes. `void bridge.start()` runs in the background and logs failures.
111
113
 
112
114
  The Cloud path uses OAuth 2.1 with PKCE through the MCP SDK: a callback server on `127.0.0.1:<redirectPort>` receives `/callback`, `createCloudFetch` rejects every non-HTTPS endpoint (loopback HTTP excepted) and caps response bodies and SSE events at 10 MiB, and after `connect` the bridge paginates `tools/list` (at most 100 pages and 1000 tools) and registers each definition. The site label comes from `getAccessibleAtlassianResources`.
113
115
 
@@ -126,7 +128,7 @@ The client half registers into `settings.section`, `sidebar.panellist` and `main
126
128
  | `src/oauth.ts` | PKCE provider, loopback callback server, HTTPS-only fetch wrapper, response size limits. |
127
129
  | `src/store.ts` | Profile-scoped credential file: naming, ownership and symlink checks, atomic `0600` writes. |
128
130
  | `src/board.ts` | `JiraBoard`: JQL search, site resolution, issue detail, transitions, projects. |
129
- | `src/routes.ts` | `/plugins/atlassian` handlers behind the DSH request fence. |
131
+ | `src/routes.ts` | `/plugins/atlassian` handlers authenticated by the DSH host. |
130
132
  | `src/open-url.ts` | Browser launch for the authorization page, HTTPS or loopback HTTP only. |
131
133
  | `src/client/index.tsx` | Settings section, sidebar entry and board panel; calls the routes above. |
132
134
  | `tests/*.test.mjs` | Bridge, configuration, security, server and browser suites. |
@@ -176,6 +178,6 @@ These constraints describe what the layer does not bridge and where a profile ha
176
178
 
177
179
  `npm run build` cleans `lib/`, compiles the host and client trees with `tsc`, then bundles `src/client/index.tsx` into `lib/client.js` with `scripts/bundle-client.mjs`. `npm test` runs that build and then `node --test tests/*.test.mjs`, which includes the Chrome-backed browser suite; `npm run typecheck` runs both `tsc --noEmit` passes. `npm run test:dsh` runs `scripts/verify-dsh.mjs`, which packs the plugin with `npm pack` and drives a real `dsh` binary (default `dsh`, overridable with `DSH_TEST_BINARY`) through profile creation, `plugin add`, the authenticated Web route, a self-hosted connect, a board load and `plugin remove`, then runs the browser check. The environment variables the script reads are `DSH_TEST_BINARY`, `DSH_TEST_MODE=server`, `DSH_TEST_UPGRADE_FROM=legacy-fixture`, `DSH_TEST_LANGUAGE` and `CHROME_PATH`.
178
180
 
179
- `lib/` is committed and CI runs `git diff --exit-code -- lib`, so rebuild and include `lib/` with any source change. Node.js 22.19 or newer is required (`engines.node`), the peer dependency is `@deepseek-ai/cordis ~4.1.0`, and the optional `dsh-tools`/`dsh-llm` development dependencies track the `0.2.2-rc.2` DSH line. The stored file is `data/atlassian-bridge-<serverName>-<first 12 hex of sha256(identity)>.json` with `version: 1`; changing the identity computation or the file naming orphans saved credentials. `tests/language.test.mjs` scans `README.md`, `CHANGELOG.md`, `NOTICE`, `src/` and `lib/` for CJK characters, so English text belongs in `README.md` and Chinese only in `README.zh.md`.
181
+ `lib/` is committed and CI runs `git diff --exit-code -- lib`, so rebuild and include `lib/` with any source change. Node.js 22.19 or newer is required (`engines.node`), the peer dependency is `@deepseek-ai/cordis ~4.1.0`, and the optional `dsh-tools` and `dsh-llm` development dependencies are declared with `*`. The stored file is `data/atlassian-bridge-<serverName>-<first 12 hex of sha256(identity)>.json` with `version: 1`; changing the identity computation or the file naming orphans saved credentials. `tests/language.test.mjs` scans `README.md`, `CHANGELOG.md`, `NOTICE`, `src/` and `lib/` for CJK characters, so English text belongs in `README.md` and Chinese only in `README.zh.md`.
180
182
 
181
183
  </details>
package/README.zh.md CHANGED
@@ -11,6 +11,8 @@ kind: "package-bundle"
11
11
 
12
12
  `dsh-atlassian` 将 dsh profile 连接到 Atlassian Cloud,或连接到一对自建 Jira、Confluence 服务。Cloud 模式与 Atlassian 远程 MCP 服务器保持 OAuth 2.1 会话,并把它向 agent 会话公布的每个工具注册进来;server 模式注册一组固定的 REST 工具。它会在 Web 客户端中加入 Atlassian 设置区与 Jira 看板面板。安装或移除使用 `dsh plugin --profile <name> add|remove @lornatang/dsh-atlassian`。边界:每行一个连接,凭据以未加密形式存放在 profile 数据目录下,OAuth 回调走回环地址。
13
13
 
14
+ 需要 DeepSeek Harness `0.2.3-alpha.2` 或更新版本。
15
+
14
16
  ## 目录
15
17
 
16
18
  - [使用本包](#use-this-package)
@@ -56,7 +58,7 @@ Cloud 模式下工具面来自远程服务器的目录:MCP `tools/list` 返回
56
58
  - `sidebar.panellist`,id `jira-board`,order 40,label `Jira`——打开看板的侧边栏图标。
57
59
  - `main`,key `jira-board`——看板本身:搜索、项目过滤、JQL 表单、按 issue 状态分列、带流转按钮的 issue 详情,以及 Send to current session / Send to new session / Copy prompt。
58
60
 
59
- 这些行背后的路由位于固定前缀 `/plugins/atlassian`(`status`、`configure`、`connect`、`disconnect`、`debug-tools`、`board`、`projects`、`transition`、`issue/<key>`、`issue/<key>/transitions`)。只有在 DSH `connection` 服务存在且其请求栅栏放行时它们才响应;没有该服务时路由返回 503。
61
+ 这些行背后的路由位于固定前缀 `/plugins/atlassian`(`status`、`configure`、`connect`、`disconnect`、`debug-tools`、`board`、`projects`、`transition`、`issue/<key>`、`issue/<key>/transitions`)。这些路由只接受 DSH 宿主已认证的会话请求。
60
62
 
61
63
  ### 配置
62
64
 
@@ -107,7 +109,7 @@ profile 补丁中有一条 `atlassian` 记录。随包提供的层以 Cloud 默
107
109
 
108
110
  本层只有一条补丁记录:一个插入 `atlassian` 的 `insert`,并带上 Cloud 默认值。补丁没有平台门控;客户端部分在 `package.json` 中声明(`dsh.client.platform: web`,并注入两个 slot 包),因此无界面 profile 只加载宿主部分,设置区与看板行只出现在 Web profile 中。
109
111
 
110
- `apply` 按 `mode` 选择桥接——Cloud 用 `AtlassianBridge`,自建用 `ServerBridge`——推导凭据身份(Cloud 为配置的 URL,自建为 `server:<jiraUrl>` 与 `<confluenceUrl>` 用 NUL 连接),用 `sessionFileFor(serverName, identity, patchPath)` 构造 `SessionStore`,创建看板,并把路由注册到 `webServer` 或 `httpServer`。所有路由都在 `connection` 服务的请求栅栏之后;若该服务在插件之后出现,`internal/service` 监听器会重新绑定路由。`void bridge.start()` 在后台运行并记录失败。
112
+ `apply` 按 `mode` 选择桥接——Cloud 用 `AtlassianBridge`,自建用 `ServerBridge`——推导凭据身份(Cloud 为配置的 URL,自建为 `server:<jiraUrl>` 与 `<confluenceUrl>` 用 NUL 连接),用 `sessionFileFor(serverName, identity, patchPath)` 构造 `SessionStore`,创建看板,并在 `webServer` 上注册需要鉴权的路由。Web 服务变化时,`internal/service` 监听器会更新绑定。`void bridge.start()` 在后台运行并记录失败。
111
113
 
112
114
  Cloud 路径通过 MCP SDK 使用带 PKCE 的 OAuth 2.1:`127.0.0.1:<redirectPort>` 上的回调服务器接收 `/callback`,`createCloudFetch` 拒绝所有非 HTTPS 端点(回环 HTTP 除外),并把响应体与 SSE 事件限制在 10 MiB;`connect` 之后桥接会分页读取 `tools/list`(最多 100 页、1000 个工具)并注册每个定义。站点标签来自 `getAccessibleAtlassianResources`。
113
115
 
@@ -126,7 +128,7 @@ Cloud 路径通过 MCP SDK 使用带 PKCE 的 OAuth 2.1:`127.0.0.1:<redirectPo
126
128
  | `src/oauth.ts` | PKCE provider、回环回调服务器、仅 HTTPS 的 fetch 包装、响应大小限制。 |
127
129
  | `src/store.ts` | profile 范围的凭据文件:命名、属主与符号链接检查、原子 `0600` 写入。 |
128
130
  | `src/board.ts` | `JiraBoard`:JQL 搜索、站点解析、issue 详情、流转、项目。 |
129
- | `src/routes.ts` | DSH 请求栅栏之后的 `/plugins/atlassian` 处理器。 |
131
+ | `src/routes.ts` | 由 DSH 宿主鉴权的 `/plugins/atlassian` 处理器。 |
130
132
  | `src/open-url.ts` | 授权页面的浏览器启动,仅 HTTPS 或回环 HTTP。 |
131
133
  | `src/client/index.tsx` | 设置区、侧边栏入口与看板面板;调用上面的路由。 |
132
134
  | `tests/*.test.mjs` | 桥接、配置、安全、服务端与浏览器测试套件。 |
@@ -176,6 +178,6 @@ Cloud 路径通过 MCP SDK 使用带 PKCE 的 OAuth 2.1:`127.0.0.1:<redirectPo
176
178
 
177
179
  `npm run build` 清理 `lib/`,用 `tsc` 编译宿主与客户端两个树,再用 `scripts/bundle-client.mjs` 把 `src/client/index.tsx` 打包成 `lib/client.js`。`npm test` 先执行该构建,再执行 `node --test tests/*.test.mjs`,其中包含依赖 Chrome 的浏览器套件;`npm run typecheck` 执行两次 `tsc --noEmit`。`npm run test:dsh` 执行 `scripts/verify-dsh.mjs`:用 `npm pack` 打包插件,并驱动真实的 `dsh` 二进制(默认 `dsh`,可用 `DSH_TEST_BINARY` 覆盖)依次完成创建 profile、`plugin add`、带认证的 Web 路由请求、自建连接、看板加载与 `plugin remove`,最后执行浏览器检查。脚本读取的环境变量是 `DSH_TEST_BINARY`、`DSH_TEST_MODE=server`、`DSH_TEST_UPGRADE_FROM=legacy-fixture`、`DSH_TEST_LANGUAGE` 与 `CHROME_PATH`。
178
180
 
179
- `lib/` 已提交,CI 会执行 `git diff --exit-code -- lib`,因此任何源码改动都要重新构建并一并提交 `lib/`。需要 Node.js 22.19 或更新版本(`engines.node`),peer 依赖是 `@deepseek-ai/cordis ~4.1.0`,可选的 `dsh-tools`/`dsh-llm` 开发依赖跟随 `0.2.2-rc.2` 的 DSH 版本线。存储文件为 `data/atlassian-bridge-<serverName>-<sha256(identity) 前 12 个十六进制字符>.json`,内容带 `version: 1`;修改身份计算或文件命名会让已保存的凭据失配。`tests/language.test.mjs` 会扫描 `README.md`、`CHANGELOG.md`、`NOTICE`、`src/` 与 `lib/` 中的 CJK 字符,因此英文写在 `README.md`,中文只能放在 `README.zh.md`。
181
+ `lib/` 已提交,CI 会执行 `git diff --exit-code -- lib`,因此任何源码改动都要重新构建并一并提交 `lib/`。需要 Node.js 22.19 或更新版本(`engines.node`),peer 依赖是 `@deepseek-ai/cordis ~4.1.0`,可选的 `dsh-tools` 和 `dsh-llm` 开发依赖声明为 `*`。存储文件为 `data/atlassian-bridge-<serverName>-<sha256(identity) 前 12 个十六进制字符>.json`,内容带 `version: 1`;修改身份计算或文件命名会让已保存的凭据失配。`tests/language.test.mjs` 会扫描 `README.md`、`CHANGELOG.md`、`NOTICE`、`src/` 与 `lib/` 中的 CJK 字符,因此英文写在 `README.md`,中文只能放在 `README.zh.md`。
180
182
 
181
183
  </details>
package/cordis.patch.yml CHANGED
@@ -1,9 +1,9 @@
1
- - insert:
2
- - id: atlassian
3
- name: '@lornatang/dsh-atlassian'
4
- config:
5
- mode: cloud
6
- serverName: atlassian
7
- url: 'https://mcp.atlassian.com/v1/mcp'
8
- redirectPort: 3334
9
- autoOpenBrowser: true
1
+ - insert:
2
+ - id: atlassian
3
+ name: '@lornatang/dsh-atlassian'
4
+ config:
5
+ mode: cloud
6
+ serverName: atlassian
7
+ url: 'https://mcp.atlassian.com/v1/mcp'
8
+ redirectPort: 3334
9
+ autoOpenBrowser: true
package/lib/client.js CHANGED
@@ -48,25 +48,25 @@ const Context = React.createContext({ slots: { inject: () => () => undefined, re
48
48
  if (typeof document !== 'undefined') {
49
49
  const style = document.createElement('style');
50
50
  style.setAttribute('data-plugin-css', '@lornatang/dsh-atlassian');
51
- style.textContent = `
52
- .dab-root{--dab-line:color-mix(in srgb,currentColor 14%,transparent);--dab-soft:color-mix(in srgb,currentColor 4%,transparent);--dab-softer:color-mix(in srgb,currentColor 2.5%,transparent);box-sizing:border-box;padding:24px 28px 36px;max-width:1120px;margin:0 auto;color:inherit;font-size:14px;line-height:1.5}
53
- .dab-root *{box-sizing:border-box}.dab-settings{max-width:900px}.dab-root h2,.dab-root h3,.dab-root p{margin:0}.dab-root button,.dab-root input,.dab-root select{font:inherit}
54
- .dab-hero{display:flex;align-items:flex-start;gap:15px;margin-bottom:24px}.dab-brand-icon,.dab-service-icon{display:grid;place-items:center;flex:none;border-radius:14px;background:rgba(79,125,244,.15);color:#7098ff}
55
- .dab-brand-icon{width:46px;height:46px}.dab-brand-icon svg{width:24px;height:24px}.dab-hero-copy{flex:1;min-width:0}.dab-eyebrow{font-size:10px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;opacity:.58;margin-bottom:3px!important}
56
- .dab-title{font-size:23px;line-height:1.2;font-weight:700;letter-spacing:-.025em}.dab-subtitle{margin-top:6px!important;opacity:.68;font-size:13px;max-width:560px}.dab-mode{flex:none;padding:5px 9px;border:1px solid var(--dab-line);border-radius:999px;background:var(--dab-soft);font-size:10px;font-weight:700;letter-spacing:.035em;opacity:.8}
57
- .dab-section-label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 0 10px;font-size:11px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;opacity:.6}
58
- .dab-status{display:flex;align-items:center;gap:14px;padding:16px 18px;border:1px solid var(--dab-line);border-radius:13px;background:var(--dab-softer)}.dab-status-icon{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:10px;color:#7296fa;background:rgba(100,137,255,.14)}
59
- .dab-status-icon.is-ready{color:#2dbb87;background:rgba(45,187,135,.14)}.dab-status-icon.is-error{color:#f47878;background:rgba(244,120,120,.14)}.dab-status-main{min-width:0;flex:1}.dab-status-title{font-weight:700;font-size:14px}.dab-status-note{opacity:.64;font-size:12px;margin-top:1px!important;overflow-wrap:anywhere}.dab-status-count{padding-left:18px;border-left:1px solid var(--dab-line);text-align:right;white-space:nowrap}.dab-status-count strong{display:block;font-size:17px;line-height:1.1}.dab-status-count span{font-size:10px;text-transform:uppercase;letter-spacing:.07em;opacity:.58}
60
- .dab-service{border:1px solid var(--dab-line);border-radius:14px;background:var(--dab-softer);padding:18px;margin-bottom:12px}.dab-service-head{display:flex;align-items:center;gap:11px;margin-bottom:16px}.dab-service-icon{width:37px;height:37px;border-radius:11px;font-size:15px;font-weight:800}.dab-service-icon.is-confluence{background:rgba(92,158,230,.15);color:#70b5f5}.dab-service-title{font-size:14px;font-weight:700;line-height:1.25}.dab-service-url{font-size:12px;opacity:.62;overflow-wrap:anywhere}.dab-service-copy{min-width:0;flex:1}.dab-service-tag{font-size:10px;font-weight:700;letter-spacing:.05em;opacity:.52;text-transform:uppercase}
61
- .dab-config-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:15px}.dab-config-head p{font-size:12px;opacity:.65;margin-top:3px!important}.dab-advanced{margin-top:14px;font-size:12px}.dab-advanced summary{cursor:pointer;font-weight:650;opacity:.75;list-style-position:inside}.dab-advanced-body{padding-top:12px}.dab-checkbox{display:flex;align-items:flex-start;gap:8px;margin-top:13px;line-height:1.4}.dab-checkbox input{accent-color:#5984f3;margin-top:2px}.dab-config-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:15px}.dab-config-hint{font-size:12px;opacity:.62}
62
- .dab-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.dab-field{display:block;min-width:0;font-size:12px;font-weight:650}.dab-field span{display:block;margin-bottom:6px}.dab-input{width:100%;min-width:0;min-height:39px;padding:8px 11px;border:1px solid var(--dab-line);border-radius:9px;background:var(--dab-soft);color:inherit;outline:none;transition:border-color .15s,box-shadow .15s}.dab-input::placeholder{color:inherit;opacity:.42}.dab-input:focus{border-color:#7196ff;box-shadow:0 0 0 3px rgba(104,145,255,.17)}
63
- .dab-help{font-size:12px;opacity:.62;margin-top:11px!important}.dab-callout{display:flex;gap:9px;align-items:flex-start;padding:11px 12px;border-radius:9px;background:rgba(226,161,40,.11);color:color-mix(in srgb,currentColor 45%,#e8a82e);font-size:12px;margin-top:13px}.dab-callout svg{width:15px;height:15px;flex:none;margin-top:1px}
64
- .dab-alert{padding:11px 13px;border:1px solid rgba(230,89,89,.3);border-radius:10px;background:rgba(230,89,89,.09);color:color-mix(in srgb,currentColor 40%,#ed6969);white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;margin-top:14px!important}.dab-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:18px}.dab-action-note{font-size:12px;opacity:.58;margin-left:auto}.dab-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 13px;border:1px solid var(--dab-line);border-radius:9px;background:var(--dab-soft);color:inherit;font-weight:600;cursor:pointer;transition:background .15s,border-color .15s,transform .15s}.dab-button:hover:not(:disabled){background:color-mix(in srgb,currentColor 9%,transparent)}.dab-button:focus-visible{outline:2px solid #7196ff;outline-offset:2px}.dab-button:disabled{opacity:.4;cursor:not-allowed}.dab-button-primary{border-color:#4678ed;background:#4678ed;color:#fff}.dab-button-primary:hover:not(:disabled){background:#356be0;border-color:#356be0}.dab-button svg{width:15px;height:15px;flex:none}
65
- .dab-link{color:#779bff;text-decoration:none;font-weight:600}.dab-link:hover{text-decoration:underline}.dab-cloud-card{padding:18px;border:1px solid var(--dab-line);border-radius:14px;background:var(--dab-softer)}.dab-cloud-card strong{display:block;margin-bottom:5px}.dab-cloud-card p{font-size:13px;opacity:.68}
66
- .dab-board-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:20px}.dab-row{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:10px 0}.dab-toolbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.dab-search{flex:1;min-width:180px}.dab-project{width:auto;min-width:140px}.dab-query{display:flex;gap:9px;align-items:center;margin:10px 0 16px;padding:10px 12px;border:1px solid var(--dab-line);border-radius:10px;background:var(--dab-softer)}.dab-query label{font-size:11px;font-weight:800;letter-spacing:.06em;opacity:.65}.dab-query .dab-input{border:0;background:transparent;min-height:32px;padding:4px 6px;flex:1}.dab-query .dab-input:focus{box-shadow:none}.dab-selection{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;margin:0 0 16px;border:1px solid rgba(105,145,255,.3);border-radius:10px;background:rgba(105,145,255,.08)}.dab-selection-count{font-size:12px;font-weight:700;margin-right:5px}
67
- .dab-columns{display:flex;align-items:flex-start;gap:12px;overflow-x:auto;padding-bottom:12px}.dab-column{min-width:230px;flex:1;border:1px solid var(--dab-line);border-radius:12px;background:var(--dab-softer);padding:10px}.dab-column-head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:3px 3px 9px;font-size:12px;font-weight:700}.dab-column-count{font-size:11px;font-weight:600;opacity:.6}.dab-issue{border:1px solid var(--dab-line);border-radius:10px;background:var(--dab-soft);padding:11px;margin:0 0 8px;cursor:pointer;transition:border-color .15s,transform .15s}.dab-issue:hover{border-color:rgba(105,145,255,.5);transform:translateY(-1px)}.dab-issue:focus-visible{outline:2px solid #7196ff;outline-offset:2px}.dab-issue-key{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;color:#7a9cff}.dab-issue-key input{accent-color:#5984f3}.dab-issue-summary{font-weight:600;font-size:13px;line-height:1.4;margin-top:7px}.dab-issue-meta{display:block;margin-top:8px;font-size:11px;opacity:.6}.dab-empty{padding:36px 18px;text-align:center;border:1px dashed var(--dab-line);border-radius:12px;opacity:.65;font-size:13px}
68
- .dab-detail{position:fixed;right:0;top:0;bottom:0;width:min(520px,90vw);overflow:auto;background:var(--dab-detail-bg,Canvas);color:CanvasText;border-left:1px solid var(--dab-line);padding:22px;z-index:50;box-shadow:0 0 24px #0004}.dab-detail-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.dab-detail pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;opacity:.85;margin:18px 0}.dab-message{font-size:13px;opacity:.8;margin:10px 0!important}.dab-root svg{display:block}
69
- @media(max-width:640px){.dab-root{padding:18px 16px 28px}.dab-hero{gap:11px}.dab-mode{display:none}.dab-field-grid{grid-template-columns:1fr}.dab-status-count{padding-left:10px}.dab-action-note{width:100%;margin-left:0}.dab-board-head{display:block}.dab-toolbar>*{min-width:0}.dab-project{flex:1}}
51
+ style.textContent = `
52
+ .dab-root{--dab-line:color-mix(in srgb,currentColor 14%,transparent);--dab-soft:color-mix(in srgb,currentColor 4%,transparent);--dab-softer:color-mix(in srgb,currentColor 2.5%,transparent);box-sizing:border-box;padding:24px 28px 36px;max-width:1120px;margin:0 auto;color:inherit;font-size:14px;line-height:1.5}
53
+ .dab-root *{box-sizing:border-box}.dab-settings{max-width:900px}.dab-root h2,.dab-root h3,.dab-root p{margin:0}.dab-root button,.dab-root input,.dab-root select{font:inherit}
54
+ .dab-hero{display:flex;align-items:flex-start;gap:15px;margin-bottom:24px}.dab-brand-icon,.dab-service-icon{display:grid;place-items:center;flex:none;border-radius:14px;background:rgba(79,125,244,.15);color:#7098ff}
55
+ .dab-brand-icon{width:46px;height:46px}.dab-brand-icon svg{width:24px;height:24px}.dab-hero-copy{flex:1;min-width:0}.dab-eyebrow{font-size:10px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;opacity:.58;margin-bottom:3px!important}
56
+ .dab-title{font-size:23px;line-height:1.2;font-weight:700;letter-spacing:-.025em}.dab-subtitle{margin-top:6px!important;opacity:.68;font-size:13px;max-width:560px}.dab-mode{flex:none;padding:5px 9px;border:1px solid var(--dab-line);border-radius:999px;background:var(--dab-soft);font-size:10px;font-weight:700;letter-spacing:.035em;opacity:.8}
57
+ .dab-section-label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 0 10px;font-size:11px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;opacity:.6}
58
+ .dab-status{display:flex;align-items:center;gap:14px;padding:16px 18px;border:1px solid var(--dab-line);border-radius:13px;background:var(--dab-softer)}.dab-status-icon{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:10px;color:#7296fa;background:rgba(100,137,255,.14)}
59
+ .dab-status-icon.is-ready{color:#2dbb87;background:rgba(45,187,135,.14)}.dab-status-icon.is-error{color:#f47878;background:rgba(244,120,120,.14)}.dab-status-main{min-width:0;flex:1}.dab-status-title{font-weight:700;font-size:14px}.dab-status-note{opacity:.64;font-size:12px;margin-top:1px!important;overflow-wrap:anywhere}.dab-status-count{padding-left:18px;border-left:1px solid var(--dab-line);text-align:right;white-space:nowrap}.dab-status-count strong{display:block;font-size:17px;line-height:1.1}.dab-status-count span{font-size:10px;text-transform:uppercase;letter-spacing:.07em;opacity:.58}
60
+ .dab-service{border:1px solid var(--dab-line);border-radius:14px;background:var(--dab-softer);padding:18px;margin-bottom:12px}.dab-service-head{display:flex;align-items:center;gap:11px;margin-bottom:16px}.dab-service-icon{width:37px;height:37px;border-radius:11px;font-size:15px;font-weight:800}.dab-service-icon.is-confluence{background:rgba(92,158,230,.15);color:#70b5f5}.dab-service-title{font-size:14px;font-weight:700;line-height:1.25}.dab-service-url{font-size:12px;opacity:.62;overflow-wrap:anywhere}.dab-service-copy{min-width:0;flex:1}.dab-service-tag{font-size:10px;font-weight:700;letter-spacing:.05em;opacity:.52;text-transform:uppercase}
61
+ .dab-config-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:15px}.dab-config-head p{font-size:12px;opacity:.65;margin-top:3px!important}.dab-advanced{margin-top:14px;font-size:12px}.dab-advanced summary{cursor:pointer;font-weight:650;opacity:.75;list-style-position:inside}.dab-advanced-body{padding-top:12px}.dab-checkbox{display:flex;align-items:flex-start;gap:8px;margin-top:13px;line-height:1.4}.dab-checkbox input{accent-color:#5984f3;margin-top:2px}.dab-config-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:15px}.dab-config-hint{font-size:12px;opacity:.62}
62
+ .dab-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.dab-field{display:block;min-width:0;font-size:12px;font-weight:650}.dab-field span{display:block;margin-bottom:6px}.dab-input{width:100%;min-width:0;min-height:39px;padding:8px 11px;border:1px solid var(--dab-line);border-radius:9px;background:var(--dab-soft);color:inherit;outline:none;transition:border-color .15s,box-shadow .15s}.dab-input::placeholder{color:inherit;opacity:.42}.dab-input:focus{border-color:#7196ff;box-shadow:0 0 0 3px rgba(104,145,255,.17)}
63
+ .dab-help{font-size:12px;opacity:.62;margin-top:11px!important}.dab-callout{display:flex;gap:9px;align-items:flex-start;padding:11px 12px;border-radius:9px;background:rgba(226,161,40,.11);color:color-mix(in srgb,currentColor 45%,#e8a82e);font-size:12px;margin-top:13px}.dab-callout svg{width:15px;height:15px;flex:none;margin-top:1px}
64
+ .dab-alert{padding:11px 13px;border:1px solid rgba(230,89,89,.3);border-radius:10px;background:rgba(230,89,89,.09);color:color-mix(in srgb,currentColor 40%,#ed6969);white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;margin-top:14px!important}.dab-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:18px}.dab-action-note{font-size:12px;opacity:.58;margin-left:auto}.dab-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 13px;border:1px solid var(--dab-line);border-radius:9px;background:var(--dab-soft);color:inherit;font-weight:600;cursor:pointer;transition:background .15s,border-color .15s,transform .15s}.dab-button:hover:not(:disabled){background:color-mix(in srgb,currentColor 9%,transparent)}.dab-button:focus-visible{outline:2px solid #7196ff;outline-offset:2px}.dab-button:disabled{opacity:.4;cursor:not-allowed}.dab-button-primary{border-color:#4678ed;background:#4678ed;color:#fff}.dab-button-primary:hover:not(:disabled){background:#356be0;border-color:#356be0}.dab-button svg{width:15px;height:15px;flex:none}
65
+ .dab-link{color:#779bff;text-decoration:none;font-weight:600}.dab-link:hover{text-decoration:underline}.dab-cloud-card{padding:18px;border:1px solid var(--dab-line);border-radius:14px;background:var(--dab-softer)}.dab-cloud-card strong{display:block;margin-bottom:5px}.dab-cloud-card p{font-size:13px;opacity:.68}
66
+ .dab-board-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:20px}.dab-row{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:10px 0}.dab-toolbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.dab-search{flex:1;min-width:180px}.dab-project{width:auto;min-width:140px}.dab-query{display:flex;gap:9px;align-items:center;margin:10px 0 16px;padding:10px 12px;border:1px solid var(--dab-line);border-radius:10px;background:var(--dab-softer)}.dab-query label{font-size:11px;font-weight:800;letter-spacing:.06em;opacity:.65}.dab-query .dab-input{border:0;background:transparent;min-height:32px;padding:4px 6px;flex:1}.dab-query .dab-input:focus{box-shadow:none}.dab-selection{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;margin:0 0 16px;border:1px solid rgba(105,145,255,.3);border-radius:10px;background:rgba(105,145,255,.08)}.dab-selection-count{font-size:12px;font-weight:700;margin-right:5px}
67
+ .dab-columns{display:flex;align-items:flex-start;gap:12px;overflow-x:auto;padding-bottom:12px}.dab-column{min-width:230px;flex:1;border:1px solid var(--dab-line);border-radius:12px;background:var(--dab-softer);padding:10px}.dab-column-head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:3px 3px 9px;font-size:12px;font-weight:700}.dab-column-count{font-size:11px;font-weight:600;opacity:.6}.dab-issue{border:1px solid var(--dab-line);border-radius:10px;background:var(--dab-soft);padding:11px;margin:0 0 8px;cursor:pointer;transition:border-color .15s,transform .15s}.dab-issue:hover{border-color:rgba(105,145,255,.5);transform:translateY(-1px)}.dab-issue:focus-visible{outline:2px solid #7196ff;outline-offset:2px}.dab-issue-key{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;color:#7a9cff}.dab-issue-key input{accent-color:#5984f3}.dab-issue-summary{font-weight:600;font-size:13px;line-height:1.4;margin-top:7px}.dab-issue-meta{display:block;margin-top:8px;font-size:11px;opacity:.6}.dab-empty{padding:36px 18px;text-align:center;border:1px dashed var(--dab-line);border-radius:12px;opacity:.65;font-size:13px}
68
+ .dab-detail{position:fixed;right:0;top:0;bottom:0;width:min(520px,90vw);overflow:auto;background:var(--dab-detail-bg,Canvas);color:CanvasText;border-left:1px solid var(--dab-line);padding:22px;z-index:50;box-shadow:0 0 24px #0004}.dab-detail-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.dab-detail pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;opacity:.85;margin:18px 0}.dab-message{font-size:13px;opacity:.8;margin:10px 0!important}.dab-root svg{display:block}
69
+ @media(max-width:640px){.dab-root{padding:18px 16px 28px}.dab-hero{gap:11px}.dab-mode{display:none}.dab-field-grid{grid-template-columns:1fr}.dab-status-count{padding-left:10px}.dab-action-note{width:100%;margin-left:0}.dab-board-head{display:block}.dab-toolbar>*{min-width:0}.dab-project{flex:1}}
70
70
  `;
71
71
  document.head.appendChild(style);
72
72
  }
package/lib/index.js CHANGED
@@ -38,20 +38,21 @@ export function apply(ctx, config) {
38
38
  ctx.effect(() => () => bridge.dispose(), 'atlassian:connection');
39
39
  ctx.effect(() => {
40
40
  let dispose;
41
- let secured = false;
41
+ let boundWeb;
42
42
  const bind = () => {
43
- const web = (scope.get('webServer') ?? scope.get('httpServer'));
44
- if (!web)
45
- return;
46
- const fence = scope.get('connection');
47
- if (dispose && (secured || !fence))
43
+ const web = scope.get('webServer');
44
+ const webIdentity = web && (Reflect.get(web, Symbol.for('cordis.original')) ?? web);
45
+ if (webIdentity === boundWeb)
48
46
  return;
49
47
  dispose?.();
50
- dispose = registerRoutes(web, bridge, board, config.board, fence, connection);
51
- secured = !!fence;
48
+ boundWeb = webIdentity;
49
+ dispose = web ? registerRoutes(web, bridge, board, config.board, connection) : undefined;
52
50
  };
53
51
  bind();
54
- const off = scope.on?.('internal/service', bind);
52
+ const off = scope.on?.('internal/service', (name) => {
53
+ if (!name || name === 'webServer')
54
+ bind();
55
+ });
55
56
  return () => { off?.(); dispose?.(); };
56
57
  }, 'atlassian:routes');
57
58
  void bridge.start().catch((error) => ctx.logger.error(`atlassian: ${String(error)}`));
package/lib/routes.js CHANGED
@@ -48,18 +48,13 @@ function required(input, key) {
48
48
  throw new BoardError('bad-request', `Missing ${key}`);
49
49
  return value;
50
50
  }
51
- export function registerRoutes(web, bridge, board, options, fence, connection) {
52
- return web.register({ kind: 'prefix', path: ROUTE_PREFIX, handler: async (req, res) => {
51
+ export function registerRoutes(web, bridge, board, options, connection) {
52
+ return web.register({ kind: 'prefix', path: ROUTE_PREFIX, auth: 'required', handler: async (req, res, peer) => {
53
+ if (!peer || peer.signal.aborted) {
54
+ res.writeHead(401).end();
55
+ return;
56
+ }
53
57
  try {
54
- if (!fence) {
55
- respond(res, 503, { ok: false, error: 'DSH connection service is unavailable' });
56
- return;
57
- }
58
- const rejection = fence.requestRejection(req);
59
- if (rejection !== undefined) {
60
- res.writeHead(rejection).end();
61
- return;
62
- }
63
58
  let url;
64
59
  try {
65
60
  url = new URL(req.url ?? '/', 'http://localhost');
@@ -5,14 +5,14 @@ import { type JiraBoard, type ToolBridge } from './board.js';
5
5
  export declare const ROUTE_PREFIX = "/plugins/atlassian";
6
6
  export interface RouteRegistrar {
7
7
  register(route: {
8
- kind: 'exact' | 'prefix';
8
+ kind: 'prefix';
9
9
  path: string;
10
- handler: (req: IncomingMessage, res: ServerResponse) => void | Promise<void>;
10
+ auth: 'required';
11
+ handler: (req: IncomingMessage, res: ServerResponse, peer?: {
12
+ signal: AbortSignal;
13
+ }) => void | Promise<void>;
11
14
  }): () => void;
12
15
  }
13
- export interface RequestFence {
14
- requestRejection(req: IncomingMessage): number | undefined;
15
- }
16
16
  export interface EditableConnection {
17
17
  snapshot(): {
18
18
  jiraUrl: string;
@@ -31,4 +31,4 @@ export interface PluginBridge extends ToolBridge {
31
31
  start(): Promise<void>;
32
32
  dispose(): Promise<void>;
33
33
  }
34
- export declare function registerRoutes(web: RouteRegistrar, bridge: PluginBridge, board: JiraBoard, options: BoardConfig, fence: RequestFence | undefined, connection?: EditableConnection): () => void;
34
+ export declare function registerRoutes(web: RouteRegistrar, bridge: PluginBridge, board: JiraBoard, options: BoardConfig, connection?: EditableConnection): () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lornatang/dsh-atlassian",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "Connect Atlassian Cloud or self-hosted Jira and Confluence to DeepSeek Harness with tools and a Jira board.",
5
5
  "keywords": [
6
6
  "deepseek-harness",
@@ -18,7 +18,7 @@
18
18
  "type": "module",
19
19
  "engines": {
20
20
  "node": ">=22.19",
21
- "dsh": "*"
21
+ "dsh": ">=0.2.3-alpha.2"
22
22
  },
23
23
  "main": "lib/index.js",
24
24
  "types": "lib/types/index.d.ts",
@@ -75,11 +75,11 @@
75
75
  },
76
76
  "devDependencies": {
77
77
  "@deepseek-ai/cordis": "~4.1.0",
78
- "@deepseek-ai/dsh-llm": "0.2.2-rc.2",
79
- "@deepseek-ai/dsh-tools": "0.2.2-rc.2",
80
- "@types/node": "^22.18.0",
78
+ "@deepseek-ai/dsh-llm": "*",
79
+ "@deepseek-ai/dsh-tools": "*",
80
+ "@types/node": "^26.6.6",
81
81
  "@types/react": "^19.3.0",
82
- "typescript": "^5.9.0"
82
+ "typescript": "^7.0.2"
83
83
  },
84
84
  "author": "Lornatang",
85
85
  "repository": {