@wwwfz/dsh-agent-bridge 0.8.3 → 0.9.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.
Files changed (40) hide show
  1. package/README.md +198 -194
  2. package/THIRD_PARTY_NOTICES.md +67 -0
  3. package/cordis.patch.yml +4 -4
  4. package/package.json +40 -40
  5. package/src/assets.js +405 -348
  6. package/src/catalog.js +906 -605
  7. package/src/client.js +623 -310
  8. package/src/config.js +88 -88
  9. package/src/export.js +241 -12
  10. package/src/index.js +160 -136
  11. package/src/project-archive.js +145 -145
  12. package/src/projects.js +1189 -980
  13. package/src/session-import.js +107 -93
  14. package/src/session-trace.js +121 -0
  15. package/src/skill-handoff.js +1327 -0
  16. package/src/skill-package.js +417 -0
  17. package/src/skill-provider.js +249 -0
  18. package/src/watch.js +309 -309
  19. package/web/Geist-OFL.txt +93 -93
  20. package/web/agent-icons/NOTICE.md +19 -19
  21. package/web/agent-icons/antigravity.svg +76 -76
  22. package/web/agent-icons/claude.svg +3 -3
  23. package/web/agent-icons/dsh.svg +58 -58
  24. package/web/agent-icons/licenses/copilot.txt +21 -21
  25. package/web/agent-icons/licenses/dsh.txt +21 -21
  26. package/web/agent-icons/licenses/gemini.txt +201 -201
  27. package/web/agent-icons/licenses/opencode.txt +21 -21
  28. package/web/agent-icons/licenses/qoder-notice.txt +18 -18
  29. package/web/agent-icons/licenses/qoder.txt +22 -22
  30. package/web/agent-icons/licenses/qwen.txt +202 -202
  31. package/web/agent-icons/qoder.svg +4 -4
  32. package/web/agent-icons/qwen.svg +5 -5
  33. package/web/agent-icons/workbuddy.svg +29 -29
  34. package/web/markdown.js +225 -0
  35. package/web/panel.css +607 -502
  36. package/web/panel.html +277 -246
  37. package/web/panel.js +2334 -1559
  38. package/web/project-context.js +25 -25
  39. package/web/vendor/markdown-it-LICENSE.txt +156 -0
  40. package/web/vendor/markdown-it.mjs +3064 -0
@@ -1,25 +1,25 @@
1
- const currentStatus = /^(?:当前状态|最新交接|current[- _]state|latest[- _]handoff)(?:$|[\s:_-])/i
2
-
3
- export function describeProjectContext({ memories, skills }) {
4
- const entries = [...memories.map(asset => describe(asset, 'memory')), ...skills.map(asset => describe(asset, 'skill'))]
5
- const candidates = entries.filter(item => !item.global && item.group === 'progress' && item.agent !== 'export')
6
- const named = candidates.filter(item => currentStatus.test(item.name))
7
- const preferred = named.length ? named : candidates
8
- const suggestedIds = [
9
- ...(preferred.length === 1 ? [preferred[0].id] : []),
10
- ...entries.filter(item => item.group === 'used').slice(0, 3).map(item => item.id),
11
- ]
12
- return { entries, suggestedIds }
13
- }
14
-
15
- function describe(asset, kind) {
16
- // The project registry has already verified WorkspaceHub notes against this working directory.
17
- const hubNote = kind === 'memory' && asset.agent === 'workspacehub' && asset.scope === 'shared'
18
- const global = asset.scope !== 'project' && !hubNote
19
- let group
20
- if (kind === 'skill') group = !global && asset.used ? 'used' : 'skills'
21
- else if (!global && (asset.detail === '项目交接' || (hubNote && asset.detail?.endsWith(' · 交接')) || currentStatus.test(asset.name))) group = 'progress'
22
- else if (['用户指引', '项目指引'].includes(asset.detail) && !/^memory$/i.test(asset.name)) group = 'guides'
23
- else group = 'notes'
24
- return { ...asset, kind, global, group }
25
- }
1
+ const currentStatus = /^(?:当前状态|最新交接|current[- _]state|latest[- _]handoff)(?:$|[\s:_-])/i
2
+
3
+ export function describeProjectContext({ memories, skills }) {
4
+ const entries = [...memories.map(asset => describe(asset, 'memory')), ...skills.map(asset => describe(asset, 'skill'))]
5
+ const candidates = entries.filter(item => !item.global && item.group === 'progress' && item.agent !== 'export')
6
+ const named = candidates.filter(item => currentStatus.test(item.name))
7
+ const preferred = named.length ? named : candidates
8
+ const suggestedIds = [
9
+ ...(preferred.length === 1 ? [preferred[0].id] : []),
10
+ ...entries.filter(item => item.group === 'used').slice(0, 3).map(item => item.id),
11
+ ]
12
+ return { entries, suggestedIds }
13
+ }
14
+
15
+ function describe(asset, kind) {
16
+ // The project registry has already verified WorkspaceHub notes against this working directory.
17
+ const hubNote = kind === 'memory' && asset.agent === 'workspacehub' && asset.scope === 'shared'
18
+ const global = asset.scope !== 'project' && !hubNote
19
+ let group
20
+ if (kind === 'skill') group = !global && asset.used ? 'used' : 'skills'
21
+ else if (!global && (asset.detail === '项目交接' || (hubNote && asset.detail?.endsWith(' · 交接')) || currentStatus.test(asset.name))) group = 'progress'
22
+ else if (['用户指引', '项目指引'].includes(asset.detail) && !/^memory$/i.test(asset.name)) group = 'guides'
23
+ else group = 'notes'
24
+ return { ...asset, kind, global, group }
25
+ }
@@ -0,0 +1,156 @@
1
+ Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin.
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+
25
+ entities-8.1.0
26
+
27
+ Copyright (c) Felix Böhm
28
+ All rights reserved.
29
+
30
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
31
+
32
+ Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
33
+
34
+ Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
35
+
36
+ THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
37
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
+
39
+ linkify-it-6.1.0
40
+
41
+ Copyright (c) 2015 Vitaly Puzrin.
42
+
43
+ Permission is hereby granted, free of charge, to any person
44
+ obtaining a copy of this software and associated documentation
45
+ files (the "Software"), to deal in the Software without
46
+ restriction, including without limitation the rights to use,
47
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
48
+ copies of the Software, and to permit persons to whom the
49
+ Software is furnished to do so, subject to the following
50
+ conditions:
51
+
52
+ The above copyright notice and this permission notice shall be
53
+ included in all copies or substantial portions of the Software.
54
+
55
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
56
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
57
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
58
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
59
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
60
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
61
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
62
+ OTHER DEALINGS IN THE SOFTWARE.
63
+
64
+ mdurl-2.1.0
65
+
66
+ Copyright (c) 2015 Vitaly Puzrin, Alex Kocharin.
67
+
68
+ Permission is hereby granted, free of charge, to any person
69
+ obtaining a copy of this software and associated documentation
70
+ files (the "Software"), to deal in the Software without
71
+ restriction, including without limitation the rights to use,
72
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
73
+ copies of the Software, and to permit persons to whom the
74
+ Software is furnished to do so, subject to the following
75
+ conditions:
76
+
77
+ The above copyright notice and this permission notice shall be
78
+ included in all copies or substantial portions of the Software.
79
+
80
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
81
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
82
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
83
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
84
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
85
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
86
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
87
+ OTHER DEALINGS IN THE SOFTWARE.
88
+
89
+ --------------------------------------------------------------------------------
90
+
91
+ .parse() is based on Joyent's node.js `url` code:
92
+
93
+ Copyright Joyent, Inc. and other Node contributors. All rights reserved.
94
+ Permission is hereby granted, free of charge, to any person obtaining a copy
95
+ of this software and associated documentation files (the "Software"), to
96
+ deal in the Software without restriction, including without limitation the
97
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
98
+ sell copies of the Software, and to permit persons to whom the Software is
99
+ furnished to do so, subject to the following conditions:
100
+
101
+ The above copyright notice and this permission notice shall be included in
102
+ all copies or substantial portions of the Software.
103
+
104
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
105
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
106
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
107
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
108
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
109
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
110
+ IN THE SOFTWARE.
111
+
112
+ punycode.js-2.3.1
113
+
114
+ Copyright Mathias Bynens <https://mathiasbynens.be/>
115
+
116
+ Permission is hereby granted, free of charge, to any person obtaining
117
+ a copy of this software and associated documentation files (the
118
+ "Software"), to deal in the Software without restriction, including
119
+ without limitation the rights to use, copy, modify, merge, publish,
120
+ distribute, sublicense, and/or sell copies of the Software, and to
121
+ permit persons to whom the Software is furnished to do so, subject to
122
+ the following conditions:
123
+
124
+ The above copyright notice and this permission notice shall be
125
+ included in all copies or substantial portions of the Software.
126
+
127
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
128
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
129
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
130
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
131
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
132
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
133
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
134
+
135
+ uc.micro-3.0.0
136
+
137
+ Copyright Mathias Bynens <https://mathiasbynens.be/>
138
+
139
+ Permission is hereby granted, free of charge, to any person obtaining
140
+ a copy of this software and associated documentation files (the
141
+ "Software"), to deal in the Software without restriction, including
142
+ without limitation the rights to use, copy, modify, merge, publish,
143
+ distribute, sublicense, and/or sell copies of the Software, and to
144
+ permit persons to whom the Software is furnished to do so, subject to
145
+ the following conditions:
146
+
147
+ The above copyright notice and this permission notice shall be
148
+ included in all copies or substantial portions of the Software.
149
+
150
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
151
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
152
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
153
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
154
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
155
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
156
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.