@shgroup/dsh-serenity-hooks 1.50.1 → 1.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -65,7 +65,7 @@ dsh plugin --profile web add link:$(pwd)/hooks/dsh-serenity-hooks
65
65
 
66
66
  ## 3. 装完之后你多了什么
67
67
 
68
- ### 3.1 十一个工具(其中两个按条件出现)
68
+ ### 3.1 十二个工具(其中三个按条件出现)
69
69
 
70
70
  | 工具 | 干什么 | 什么时候用 |
71
71
  |---|---|---|
@@ -80,6 +80,7 @@ dsh plugin --profile web add link:$(pwd)/hooks/dsh-serenity-hooks
80
80
  | `container_admin` | 机务舱:管理子角色、管理小工具注册表、查看全部配置 | 定义"子角色"、注册新小工具、改配置时 |
81
81
  | `im-bridge` | 给 IM 联系人发消息(目前是微信):发文本、发文件、查已配置联系人、查通道状态。每次成功发送自动进工作区的消息记录 | 想让 AI 主动给家人/同事发消息(见 §6.6)。**只在工作区配了微信桥时才出现**,且只能发本工作区的消息 |
82
82
  | `acc-diag` | ACC 运行态诊断:一次调用出全报告——当前有多少会话活着、各自属于哪个工作区、唤醒时钟的武装态与 tick 次数、唤醒登记表的每一条(含状态 / 投递结果 / 补跑窗口) | **ACC 维护者专用**。**默认对所有工作区隐藏**,只有在工作区配置里点名(`exclusiveTools`)才出现 |
83
+ | `diagram` | 画图:AI 给一段**标签式源码**(`<diagram>` 根 + `<rect>` / `<arrow>` / `<text>` / `<color>` / `<legend>`),插件**在进程内**把它画成 PNG 并**贴进对话**(可回看、可被后续轮次引用)——**不启浏览器、不截图、正常路径不落文件**。坐标 = **画布像素、y 向下**(`domain="x0,y0,x1,y1"` 可选);写错的图元**逐条报错并跳过**,其余照画。自带四项体检(块重叠 / 标签溢出 / 悬空端点 / 线压字),**只告警不拦图** | 想把关系图/示意图直接放进对话时。**实验性 demo,默认关**:关着的时候这个工具**根本不注册**(AI 看不到它,不占上下文);开关在设置面板「工具」组,**拨动即时生效**(不必重启)。中英文与常用符号(`①` `⇒` `→` `★`)都能画,是因为**三个字型随插件内置**(汉字 + 拉丁 + 符号,合计约 5 MB) |
83
84
 
84
85
  > **改过名**(旧名已彻底停用,没有兼容别名):下面每组的箭头链是**逐个发布版本**的名字,**末项才是今名**——`cc_fs` → `container_fs` · `cc_git` → `container_git` · `session`+`session_rebuild` → `logbook`(v1.30/1.31)→ `trajectory`(v1.32)→ **`container_trajectory`**(v1.34,今名) · `acc_kit` → `dashboard` · `acc_msm` → `msm`(执行)+ `container_admin`(管理)· `eap`/`neat`/`cce` → `praxis` · `skiff_admin` → `container_admin role` · `autopilot-trajectory` → `trajectory`(v1.32)→ **`container_trajectory`**(v1.34,今名)。老会话里看到旧名,**一律取所在那一组的末项**。
85
86
 
@@ -379,7 +380,7 @@ pnpm build # 打包(lib/index.js + client.js)
379
380
  | 跑在 | OpenCode | DeepSeek Harness |
380
381
  | 实现 | 独立 | **独立**(不复用源码,但遵循同一套标准) |
381
382
  | 系统提示词 | `system.transform` | `systemPrompt.section`,平台无关的部分逐字对齐 |
382
- | 工具 | msm / container_fs / logbook 等 | container_fs / container_trajectory / dashboard / container_git / msm / praxis / handyman / localstore / container_admin + 两个条件出现的(`im-bridge` / `acc-diag`) |
383
+ | 工具 | msm / container_fs / logbook 等 | container_fs / container_trajectory / dashboard / container_git / msm / praxis / handyman / localstore / container_admin + 三个条件出现的(`im-bridge` / `acc-diag` / `diagram`) |
383
384
 
384
385
  **同一个工作区可以随时换运行时**:`.serenity` 标记、`.opencode/skills/`、配置、`AGENT_SESSIONS/` 的文件格式都一致;
385
386
  差别只在平台层(工具名、注入方式),换过去以后 AI 收到的约束是一样的。
Binary file
@@ -0,0 +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.
@@ -0,0 +1,78 @@
1
+ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2
+ Upstream-Name: DejaVu fonts
3
+ Upstream-Author: Stepan Roh <src@users.sourceforge.net> (original author),
4
+ see /usr/share/doc/fonts-dejavu-core/AUTHORS for full list
5
+ Source: https://dejavu-fonts.github.io/
6
+
7
+ Files: *
8
+ Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved.
9
+ Bitstream Vera is a trademark of Bitstream, Inc.
10
+ DejaVu changes are in public domain.
11
+ License: bitstream-vera
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of the fonts accompanying this license ("Fonts") and associated
14
+ documentation files (the "Font Software"), to reproduce and distribute the
15
+ Font Software, including without limitation the rights to use, copy, merge,
16
+ publish, distribute, and/or sell copies of the Font Software, and to permit
17
+ persons to whom the Font Software is furnished to do so, subject to the
18
+ following conditions:
19
+ .
20
+ The above copyright and trademark notices and this permission notice shall
21
+ be included in all copies of one or more of the Font Software typefaces.
22
+ .
23
+ The Font Software may be modified, altered, or added to, and in particular
24
+ the designs of glyphs or characters in the Fonts may be modified and
25
+ additional glyphs or characters may be added to the Fonts, only if the fonts
26
+ are renamed to names not containing either the words "Bitstream" or the word
27
+ "Vera".
28
+ .
29
+ This License becomes null and void to the extent applicable to Fonts or Font
30
+ Software that has been modified and is distributed under the "Bitstream
31
+ Vera" names.
32
+ .
33
+ The Font Software may be sold as part of a larger software package but no
34
+ copy of one or more of the Font Software typefaces may be sold by itself.
35
+ .
36
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
37
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
38
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
39
+ TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
40
+ FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
41
+ ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
42
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
43
+ THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE
44
+ FONT SOFTWARE.
45
+ .
46
+ Except as contained in this notice, the names of Gnome, the Gnome
47
+ Foundation, and Bitstream Inc., shall not be used in advertising or
48
+ otherwise to promote the sale, use or other dealings in this Font Software
49
+ without prior written authorization from the Gnome Foundation or Bitstream
50
+ Inc., respectively. For further information, contact: fonts at gnome dot
51
+ org.
52
+
53
+ Files: debian/*
54
+ Copyright: (C) 2005-2006 Peter Cernak <pce@users.sourceforge.net>
55
+ (C) 2006-2011 Davide Viti <zinosat@tiscali.it>
56
+ (C) 2011-2013 Christian Perrier <bubulle@debian.org>
57
+ (C) 2013 Fabian Greffrath <fabian+debian@greffrath.com>
58
+ License: GPL-2+
59
+ This program is free software; you can redistribute it
60
+ and/or modify it under the terms of the GNU General Public
61
+ License as published by the Free Software Foundation; either
62
+ version 2 of the License, or (at your option) any later
63
+ version.
64
+ .
65
+ This program is distributed in the hope that it will be
66
+ useful, but WITHOUT ANY WARRANTY; without even the implied
67
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
68
+ PURPOSE. See the GNU General Public License for more
69
+ details.
70
+ .
71
+ You should have received a copy of the GNU General Public
72
+ License along with this package; if not, write to the Free
73
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor,
74
+ Boston, MA 02110-1301 USA
75
+ .
76
+ On Debian systems, the full text of the GNU General Public
77
+ License version 2 can be found in the file
78
+ /usr/share/common-licenses/GPL-2'.
@@ -0,0 +1,155 @@
1
+ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2
+ Upstream-Name: Noto
3
+ Upstream-Contact: https://github.com/googlei18n/noto-fonts/issues
4
+ http://groups.google.com/group/noto-font
5
+ Source: https://github.com/googlei18n/noto-fonts
6
+
7
+ Files: *
8
+ Copyright:
9
+ 2010,2012-2020, Google Inc.
10
+ 2015-2020, Google LLC.
11
+ License-Grant:
12
+ This Font Software is licensed under the SIL Open Font License,
13
+ Version 1.1.
14
+ License: OFL-1.1
15
+
16
+ Files:
17
+ debian/*
18
+ Copyright:
19
+ 2013-2020, Jonas Smedegaard <dr@jones.dk>
20
+ 2020, Purism, SPC
21
+ 2013, Vasudev Kamath <kamathvasudev@gmail.com>
22
+ License-Grant:
23
+ This program is free software;
24
+ you can redistribute it and/or modify it
25
+ under the terms of the GNU General Public License
26
+ as published by the Free Software Foundation;
27
+ either version 3, or (at your option) any later version.
28
+ License: GPL-3+
29
+
30
+ Files:
31
+ debian/NotoMono/NotoMono-Regular.ttf
32
+ Copyright:
33
+ 2007, Google Inc.
34
+ License-Grant:
35
+ This Font Software is licensed under the SIL Open Font License,
36
+ Version 1.1.
37
+ License: OFL-1.1
38
+
39
+ License: OFL-1.1
40
+ PREAMBLE
41
+ .
42
+ The goals of the Open Font License (OFL) are to stimulate
43
+ worldwide development of collaborative font projects,
44
+ to support the font creation efforts
45
+ of academic and linguistic communities,
46
+ and to provide a free and open framework
47
+ in which fonts may be shared and improved
48
+ in partnership with others.
49
+ .
50
+ The OFL allows the licensed fonts to be used, studied,
51
+ modified and redistributed freely
52
+ as long as they are not sold by themselves.
53
+ The fonts, including any derivative works,
54
+ can be bundled, embedded,
55
+ redistributed and/or sold with any software
56
+ provided that any reserved names are not used
57
+ by derivative works.
58
+ The fonts and derivatives, however,
59
+ cannot be released under any other type of license.
60
+ The requirement for fonts to remain under this license
61
+ does not apply to any document
62
+ created using the fonts or their derivatives.
63
+ .
64
+ DEFINITIONS
65
+ .
66
+ "Font Software" refers to the set of files
67
+ released by the Copyright Holder(s) under this license
68
+ and clearly marked as such.
69
+ This may include source files, build scripts and documentation.
70
+ .
71
+ "Reserved Font Name" refers to any names specified as such
72
+ after the copyright statement(s).
73
+ .
74
+ "Original Version" refers to the collection
75
+ of Font Software components
76
+ as distributed by the Copyright Holder(s).
77
+ .
78
+ "Modified Version" refers to any derivative
79
+ made by adding to, deleting, or substituting --
80
+ in part or in whole --
81
+ any of the components of the Original Version,
82
+ by changing formats
83
+ or by porting the Font Software to a new environment.
84
+ .
85
+ "Author" refers to any designer, engineer, programmer,
86
+ technical writer or other person
87
+ who contributed to the Font Software.
88
+ .
89
+ PERMISSION & CONDITIONS
90
+ .
91
+ Permission is hereby granted, free of charge,
92
+ to any person obtaining a copy of the Font Software,
93
+ to use, study, copy, merge, embed, modify, redistribute,
94
+ and sell modified and unmodified copies of the Font Software,
95
+ subject to the following conditions:
96
+ .
97
+ 1) Neither the Font Software nor any of its individual components,
98
+ in Original or Modified Versions,
99
+ may be sold by itself.
100
+ .
101
+ 2) Original or Modified Versions of the Font Software
102
+ may be bundled, redistributed and/or sold with any software,
103
+ provided that each copy contains the above copyright notice
104
+ and this license.
105
+ These can be included either as stand-alone text files,
106
+ human-readable headers or in the appropriate
107
+ machine-readable metadata fields within text or binary files
108
+ as long as those fields can be easily viewed by the user.
109
+ .
110
+ 3) No Modified Version of the Font Software may use
111
+ the Reserved Font Name(s)
112
+ unless explicit written permission is granted
113
+ by the corresponding Copyright Holder.
114
+ This restriction only applies to the primary font name
115
+ as presented to the users.
116
+ .
117
+ 4) The name(s) of the Copyright Holder(s)
118
+ or the Author(s) of the Font Software
119
+ shall not be used to promote,
120
+ endorse or advertise any Modified Version,
121
+ except to acknowledge the contribution(s)
122
+ of the Copyright Holder(s) and the Author(s)
123
+ or with their explicit written permission.
124
+ .
125
+ 5) The Font Software,
126
+ modified or unmodified, in part or in whole,
127
+ must be distributed entirely under this license,
128
+ and must not be distributed under any other license.
129
+ The requirement for fonts to remain under this license
130
+ does not apply to any document
131
+ created using the Font Software.
132
+ .
133
+ TERMINATION
134
+ .
135
+ This license becomes null and void
136
+ if any of the above conditions are not met.
137
+ .
138
+ DISCLAIMER
139
+ .
140
+ THE FONT SOFTWARE IS PROVIDED "AS IS",
141
+ WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
142
+ INCLUDING BUT NOT LIMITED TO
143
+ ANY WARRANTIES OF MERCHANTABILITY,
144
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
145
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT.
146
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE
147
+ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
148
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT,
149
+ INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
150
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
151
+ ARISING FROM, OUT OF THE USE OR INABILITY TO USE
152
+ THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
153
+
154
+ License: GPL-3+
155
+ License-Reference: /usr/share/common-licenses/GPL-3
@@ -0,0 +1,89 @@
1
+ # assets/diagram — 出图用的内置字型(**为什么必须随包分发**)
2
+
3
+ 这三个字型是 `diagram` 工具在**光栅化**时必须喂给 resvg-wasm 的,原因是一次**实测**:
4
+
5
+ > 在 docker 里给容器装好中文字体(`fc-list` 认得它)之后,resvg-wasm 渲染中文**仍然得到空白画布**,
6
+ > 且 `loadSystemFonts: true|false` 两份 PNG **逐字节相同** ⇒ **wasm 对系统字体完全不可见**。
7
+ > 只有 `fontBuffers`(把字体字节直接递给它)才画得出字。
8
+ > ⇒ 顺带白拿一条:**输出与机器无关**(同一份内置字型 ⇒ 逐字节可复现)。
9
+
10
+ ## 0. 三个字型各修好了什么(**每一个都由一张实测对照图证明**)
11
+
12
+ | 字型 | 覆盖 | 没有它会怎样(实测) |
13
+ |---|---|---|
14
+ | `DroidSansFallbackFull.ttf` | 汉字 | 中文**全变方框** |
15
+ | `NotoSans-Regular.ttf` | 拉丁 | `diagram` / `parseDsl` 全变方框(Droid 是 **CJK 兜底字型**,**不含拉丁**) |
16
+ | `DejaVuSans.ttf` | 符号 | `① ② ③` / `⇒` / `→` 仍是方框(**前两个都没有这些字形**) |
17
+
18
+ 🔴 **判据的教训**:起初的验收是"有字 vs 无字逐字节不同" —— 它只证明**有墨**,
19
+ **没证明墨是那个字**(方框也是墨)⇒ 拉丁全变方框时它**照样绿**。
20
+ ⇒ 现在每条覆盖声明都配一条**点名字符集**的差分用例:**同长度不同字形必须出不同墨**。
21
+
22
+ ## 1. `DroidSansFallbackFull.ttf`(汉字,3.8 MB,Apache-2.0)
23
+
24
+ ```
25
+ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
26
+ Upstream-Name: Droid
27
+ Source: https://android.googlesource.com/platform/frameworks/base/
28
+ Files: *
29
+ Copyright: Copyright © 2006, 2007, 2008, 2009, 2010 Google Corp.
30
+ Droid is a trademark of Google Corp.
31
+ License: Apache-2
32
+ On Debian systems, the complete text of the Apache License Version 2.0
33
+ can be found in `/usr/share/common-licenses/Apache-2.0'.
34
+ ```
35
+
36
+ 取件处(本机):`/usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf`(Debian `fonts-droid-fallback`)。
37
+ 许可证全文随包:`LICENSE-Apache-2.0.txt`。
38
+
39
+ ## 2. `NotoSans-Regular.ttf`(拉丁,500 KB,OFL-1.1)—— v1.51.1 新增
40
+
41
+ 🔴 **为什么必须补第二个字型**:`DroidSansFallbackFull` 是**汉字兜底字型**(Android 当年把它与
42
+ `DroidSans.ttf` 配成一对),它**不含拉丁字母** ⇒ v1.51.0 只带它时,图里 `diagram` / `parseDsl` /
43
+ `·` 全部渲染成**方框**(owner 实测图上肉眼可见)。
44
+
45
+ ```
46
+ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
47
+ Upstream-Name: Noto
48
+ Source: https://github.com/notofonts/noto-fonts
49
+ License: OFL-1.1
50
+ ```
51
+
52
+ 取件处(本机):`/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf`(Debian `fonts-noto-core`)。
53
+ 许可证全文随包:`LICENSE-OFL-1.1.txt`(即该包的 Debian `copyright` 文件,内含 OFL-1.1 全文与出处)。
54
+
55
+ ## 3. `DejaVuSans.ttf`(符号,742 KB)—— v1.51.1 续(D108)
56
+
57
+ 🔴 **为什么还要第三个**:补完拉丁之后**再看了一眼真图**,发现 `① ② ③` 与 `⇒` / `→` **仍然是方框**
58
+ —— 前两个字型都没有这些字形(`DroidSansFallbackFull` 有汉字但没有象征符号;`NotoSans-Regular`
59
+ 有拉丁与常用标点,但没有带圈数字与箭头)。而本仓自己的文档**满屏 `⇒`** ⇒ 图里出现它是常态。
60
+
61
+ **选型是量出来的**(各喂一个缓冲单独渲染一张对照图,肉眼看):
62
+
63
+ | 候选 | 结果 |
64
+ |---|---|
65
+ | `NotoSansSymbols2-Regular.ttf` | ❌ 只有 `▲ ● ★ ✓ ✗`;`①`/`⇒`/`→` 仍是方框 |
66
+ | `NotoSansSymbols-Regular.ttf` | ❌ 同上量级(未单独出图,覆盖面是 Symbols2 的子集方向) |
67
+ | `DejaVuSans.ttf` | ✅ **全覆盖**:`① ② ③ ⇒ → ← ▲ ● ★ ✓ ✗ ·— ≥ ≠ ×` |
68
+
69
+ ```
70
+ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
71
+ Upstream-Name: DejaVu
72
+ Source: https://github.com/dejavu-fonts/dejavu-fonts
73
+ License: Bitstream-Vera
74
+ ```
75
+
76
+ 取件处(本机):`/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf`(Debian `fonts-dejavu-core`)。
77
+ 许可证全文随包:`LICENSE-DejaVu.txt`(即该包的 Debian `copyright` 文件)。
78
+
79
+ ## 4. 家族名与文件必须以同一份事实为准
80
+
81
+ 家族名(`'Noto Sans'` / `'DejaVu Sans'` / `'Droid Sans Fallback'`)、资产路径与 SVG 家族栈的
82
+ **唯一真相源** = `src/diagram/fonts.ts`;`src/diagram/rasterize.ts` 负责按路径把字节读进来喂 wasm。
83
+
84
+ 🔴 **家族名是量出来的**:三个名字取自各文件 `name` 表 `nameID=1`(平台 3 / UTF-16BE)。
85
+ 必须这样量一次的原因:写错名字时 resvg 的**自动回退仍可能把字画出来**(**图上看不出来**)
86
+ ⇒ "栈里的名字是对的"这件事只有直接读字体文件才能证明。
87
+
88
+ 三个资产**都必须在 `package.json` 的 `files` 白名单里**,并被 `dsh-develop pack-check` 的
89
+ `required` 清单硬断言(漏了 = 装得上但画不出字,v1.26.15 事故同族)。
package/dsh.plugin.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "id": "dsh-serenity-hooks",
3
- "version": "1.50.1",
3
+ "version": "1.51.1",
4
4
  "main": "lib/index.js",
5
- "description": "宁静号 ACC harness(Native Cordis 插件):给 DSH 装一个「AI 工作区」——11 个工具(container_fs/container_trajectory/dashboard/container_git/msm/praxis/handyman/localstore/container_admin/im-bridge/acc-diag;后两个按配置条件出现)+ 机械约束(安全模式/工作区围墙/密钥守卫)+ 轨迹日志与原地重建 + 网页登录入口/微信桥/子角色/对外问答页/trajectory 唤醒注册表。适配 DSH 0.1.7-rc.1(deepseek-ai/deepseek-harness)。",
5
+ "description": "宁静号 ACC harness(Native Cordis 插件):给 DSH 装一个「AI 工作区」——12 个工具(container_fs/container_trajectory/dashboard/container_git/msm/praxis/handyman/localstore/container_admin/im-bridge/acc-diag/diagram;后三个按配置条件出现)+ 机械约束(安全模式/工作区围墙/密钥守卫)+ 轨迹日志与原地重建 + 网页登录入口/微信桥/子角色/对外问答页/trajectory 唤醒注册表。适配 DSH 0.1.7-rc.1(deepseek-ai/deepseek-harness)。",
6
6
  "engines": {
7
7
  "dsh": ">=0.1.7-rc.1"
8
8
  },
@@ -18,7 +18,8 @@
18
18
  "localstore",
19
19
  "container_admin",
20
20
  "im-bridge",
21
- "acc-diag"
21
+ "acc-diag",
22
+ "diagram"
22
23
  ],
23
24
  "skills": []
24
25
  }
@@ -1,4 +1,4 @@
1
- import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { a as hostSessions, i as hostService } from "./access-CNccNtgf.js";
3
3
  import { a as findSerenityRoot } from "./ccc-DG4Oc7I1.js";
4
4
  import { basename } from "node:path";
@@ -150,7 +150,7 @@ async function listCccs(ctx, opts = {}) {
150
150
  if (typeof defaultRoot === "string" && defaultRoot !== "" && !c.roots.includes(defaultRoot)) c.roots.unshift(defaultRoot);
151
151
  let rolesOf = null;
152
152
  if (opts.withRoles === true) {
153
- const { readSkiffRoles } = await import("./skiff-role-KqQA6pkr.js").then((n) => n.u);
153
+ const { readSkiffRoles } = await import("./skiff-role-DQZ6eR51.js").then((n) => n.u);
154
154
  rolesOf = (root) => [...readSkiffRoles(root).keys()];
155
155
  }
156
156
  return c.roots.map((root) => ({
package/lib/client.js CHANGED
@@ -4812,6 +4812,7 @@ Instruction-following style:
4812
4812
  const publicAskOn = value?.publicAskEnabled ?? false;
4813
4813
  const croOn = value?.croEnabled ?? true;
4814
4814
  const unattendedOn = value?.unattendedEnabled ?? false;
4815
+ const diagramOn = value?.diagramEnabled ?? false;
4815
4816
  const [openGateway, setOpenGateway] = (0, react.useState)(false);
4816
4817
  const [openRebuild, setOpenRebuild] = (0, react.useState)(false);
4817
4818
  const [openSkiff, setOpenSkiff] = (0, react.useState)(false);
@@ -4819,6 +4820,7 @@ Instruction-following style:
4819
4820
  const [openPublicAsk, setOpenPublicAsk] = (0, react.useState)(false);
4820
4821
  const [openCro, setOpenCro] = (0, react.useState)(false);
4821
4822
  const [openUnattended, setOpenUnattended] = (0, react.useState)(false);
4823
+ const [openDiagram, setOpenDiagram] = (0, react.useState)(false);
4822
4824
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4823
4825
  className: "ss-section",
4824
4826
  children: [
@@ -5000,6 +5002,27 @@ Instruction-following style:
5000
5002
  }) })
5001
5003
  ]
5002
5004
  }),
5005
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Group, {
5006
+ title: "工具",
5007
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowCard, {
5008
+ title: "图(diagram)",
5009
+ desc: "agent 给一段标签式源码,进程内直接画出 PNG 并贴进对话(不借浏览器;默认关)",
5010
+ expandable: true,
5011
+ open: openDiagram,
5012
+ onToggle: setOpenDiagram,
5013
+ control: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Toggle, {
5014
+ checked: diagramOn,
5015
+ onChange: (on) => toggle("diagramEnabled", on)
5016
+ }),
5017
+ detail: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
5018
+ className: "ss-detailStack",
5019
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
5020
+ className: "ss-detailIntro",
5021
+ children: "图(diagram 工具)\n· 作用:agent 给一段**标签式源码**(<diagram> 根 + <rect>/<arrow>/<text>/<color>/<legend>),\n 由 ACC **在进程内**画成图并贴进对话 —— 不启浏览器、不截图\n· 产物:图进对话记录(可回看、可被后续轮次引用、可转微信);同时落两份文件在容器的\n _tmp/diagram/(.svg 可读可改 / .png 是进对话的那份)\n· 自带体检:重叠块 / 标签溢出 / 悬空端点 / 线压字,四条**只告警不拦图**;\n 写错的图元被跳过并逐条报错,其余照画\n· 中文能画:字体**随插件内置**(约 3.8 MB)—— 光栅化引擎看不见系统字体,只能喂内置的\n· 默认关:它是 owner 要的 demo 功能;**关着的时候工具根本不注册**(模型看不到它,不占上下文)\n· 图要贴进对话有个前提:**当前模型路由要声明收图像输入**。没声明时图照样画、照样落盘,\n 回执里写明原因并给路径(同「读图」工具的门)"
5022
+ })
5023
+ })
5024
+ }) })
5025
+ }),
5003
5026
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Collapse, {
5004
5027
  title: "彩蛋模式",
5005
5028
  desc: "persona 输出风格(默认关闭)",
@@ -0,0 +1,8 @@
1
+ import type { DslModel } from './dsl.js';
2
+ export interface DslRender {
3
+ svg: string;
4
+ lint: string[];
5
+ errors: string[];
6
+ marks: number;
7
+ }
8
+ export declare function renderDsl(model: DslModel): DslRender;