dsh-stop-pushing-shit 0.0.0-stage → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 321sssrt-bit
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,117 @@
1
- # Temporary Holding Version
1
+ # STOP-PUSHING-SHIT for DSH
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ DSH 原生插件,版本 0.1.2。创建 GitHub 仓库(含 fork、模板)、Issue、PR 和
4
+ `git push` 前,先返回完整请求供审阅;用户单独发送 `授权提交` 后,只执行该请求一次。
5
+ 参数、工作目录或推送提交改变,执行失败、取消或本轮结束后,都不能复用旧授权。
6
+
7
+ ## 安装
8
+
9
+ 需要 Node.js 24.9+、DSH、其插件管理命令使用的 pnpm,以及用于核对推送内容的 Git。
10
+ 推荐从 npm 安装,包内已包含三个支持平台的程序,不需要手动选择平台:
11
+
12
+ ```sh
13
+ dsh plugin --profile web add dsh-stop-pushing-shit@0.1.2
14
+ ```
15
+
16
+ Windows PowerShell 将 `dsh` 换成 `dsh.cmd`。升级时使用目标版本运行同一条命令。
17
+ 安装时不会从 GitHub 或开发者服务器额外下载程序。
18
+
19
+ ### GitHub Release 备用安装
20
+
21
+ 从 [DSH 0.1.2 Release](https://github.com/321sssrt-bit/STOP-PUSHING-SHIT/releases/tag/dsh-v0.1.2)
22
+ 下载 `dsh-stop-pushing-shit-0.1.2.tgz`,它与 npm 发布使用同一个文件;也可按平台下载更小的包:
23
+
24
+ - macOS Apple Silicon:`dsh-stop-pushing-shit-0.1.2-darwin-arm64.tgz`
25
+ - Linux ARM64:`dsh-stop-pushing-shit-0.1.2-linux-arm64.tgz`
26
+ - Windows x64:`dsh-stop-pushing-shit-0.1.2-windows-amd64.tgz`
27
+
28
+ 在终端运行,路径替换为下载或本地构建的包:
29
+
30
+ ```sh
31
+ dsh plugin --profile web add /absolute/path/dsh-stop-pushing-shit-0.1.2.tgz
32
+ ```
33
+
34
+ Windows PowerShell 使用:
35
+
36
+ ```powershell
37
+ dsh.cmd plugin --profile web add C:\path\to\dsh-stop-pushing-shit-0.1.2.tgz
38
+ ```
39
+
40
+ 若没有全局 pnpm,也可以临时提供,不必修改全局安装:
41
+
42
+ ```sh
43
+ npm exec --yes --package=pnpm -- dsh plugin --profile web add dsh-stop-pushing-shit@0.1.2
44
+ ```
45
+
46
+ 安装到实际使用的 profile;使用 `headless` 时把 `web` 改为 `headless`。安装后重新启动
47
+ 该 DSH profile。插件管理页应显示 `stop-pushing-shit` 已启用且无加载错误。
48
+ 源码目录没有内置二进制,不能直接当安装包使用。
49
+
50
+ 插件通过 DSH bundle 自动加载,无须改 Codex hooks,也不需要模型 API key 或独立服务。
51
+ 运行状态放在 `$DSH_HOME/data/stop-pushing-shit/`;未设置 `DSH_HOME` 时使用
52
+ `~/.dsh/data/stop-pushing-shit/`。不读取或复用 Codex 的授权状态。
53
+
54
+ ## 使用
55
+
56
+ 1. 让助手准备创建或推送操作。首次工具调用会被拒绝,并返回完整参数。
57
+ 2. 阅读助手展示的参数、可见性或推送的目标及提交。
58
+ 3. 另发一条完整消息 `授权提交`。只对原请求授权本轮一次;重试需要重新授权。
59
+
60
+ 只认主会话中 DSH 标记为 `source.kind: user` 的真实用户消息。自动续跑、工具反馈、
61
+ 子代理任务和历史回放不提供授权。授权文本必须是单个文本块且完整匹配,不能附带其他内容。
62
+
63
+ ## 停用与卸载
64
+
65
+ 在 DSH 插件管理页关闭本 bundle,重启对应 profile 后生效。关闭后保护也随之停止。
66
+ 重新启用会撤销旧的有效授权。卸载:
67
+
68
+ ```sh
69
+ dsh plugin --profile web remove dsh-stop-pushing-shit
70
+ ```
71
+
72
+ 卸载不会自动删除状态目录。该目录可能包含用户审阅过的请求参数;确认不再需要后可自行删除。
73
+
74
+ ## 支持范围
75
+
76
+ - 使用原生 `tools.guard()`,在普通 `tools/pre-execute` 放行后仍能拒绝调用。
77
+ Go 程序缺失、无法运行、超时、输出无效或状态损坏时拒绝执行。
78
+ - 完整保留结构化工具参数;Shell 接入支持标准 `dsh-tool-bash` 和 `dsh-tool-pwsh`。
79
+ 有状态的 persistent shell 和交互终端输入不能按独立完整命令核对,明确拒绝;
80
+ 请使用 DSH 默认 Web profile 的标准 Shell 工具。
81
+ - DSH 对过长或含特殊字符的 MCP 工具名进行改名后,不再向执行入口提供原始名字。
82
+ 这类调用明确拒绝;请缩短 MCP `serverName`,并使用标准工具名(例如 `create_issue`)。
83
+ - 规则和命令识别全部来自仓库已有 Go 程序;JS 只负责宿主事件、工具适配和运行程序。
84
+ 这仍是有限命令识别,不是操作系统沙箱,也不能防住任意自定义工具内隐藏的外部写入。
85
+ - DSH 将插件和配置视为可信代码。插件根本未加载、被禁用或被其他插件删除时,不能提供保护。
86
+ 安装状态、模型提示文字或包存在本身不等于保护已运行。
87
+ - 提供并验证了 macOS ARM64、Linux ARM64、Windows x64 包。
88
+ Windows 使用宿主的标准 PowerShell 工具,已在 PowerShell 5.1 下验证;
89
+ 其他架构未做 DSH 宿主验收。
90
+
91
+ ## 开发与验证
92
+
93
+ 开发时可给插件配置绝对路径 `binary`、`dataDir`;通常安装不需要配置。
94
+ 在源码根目录构建原有 Go 程序,再打包:
95
+
96
+ ```sh
97
+ go build -trimpath -o /tmp/issue-pr-guard .
98
+ node tools/package-dsh.mjs darwin-arm64 /tmp/issue-pr-guard
99
+ ```
100
+
101
+ Linux 包必须使用 Linux ARM64 程序;可用现有 `tools/build-release.sh` 交叉构建。
102
+ Windows 包使用 `windows-amd64` 参数及新构建的 `.exe` 程序。
103
+ 输出目录为 `dist/dsh/`。包只含接入代码、当前平台二进制、说明和许可证。
104
+
105
+ ```sh
106
+ SPS_DSH_ROOT=/absolute/path/to/node_modules/@deepseek-ai/dsh \
107
+ SPS_DSH_BINARY=/absolute/path/to/freshly-built-guard \
108
+ node --test tests/dsh-host.test.mjs
109
+ ```
110
+
111
+ 测试使用已安装的真实 Cordis、DSH AgentLoop、会话及工具分发器,配合确定性模型响应;
112
+ 官方 Bash / PowerShell 执行器实际执行临时目录内的命令和本地裸仓库推送。
113
+ 不调用付费模型,不向 GitHub 写入,不修改日常 DSH 配置。
114
+
115
+ Windows 的崩溃、无效输出和超时测试使用原生测试程序,避免把不能执行 Unix 脚本误当成
116
+ 故障处理通过。开发者需先构建 `./tests/dsh-fault-guard`,再把
117
+ `SPS_DSH_FAULT_BINARY` 指向该 `.exe`;它不进入安装包。
@@ -0,0 +1,876 @@
1
+ Third-party notices for STOP-PUSHING-SHIT
2
+
3
+ mvdan.cc/sh/v3@v3.14.1
4
+ Copyright (c) 2016, Daniel Martí. All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are
8
+ met:
9
+
10
+ * Redistributions of source code must retain the above copyright
11
+ notice, this list of conditions and the following disclaimer.
12
+ * Redistributions in binary form must reproduce the above
13
+ copyright notice, this list of conditions and the following disclaimer
14
+ in the documentation and/or other materials provided with the
15
+ distribution.
16
+ * Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+
32
+
33
+ github.com/tree-sitter/go-tree-sitter@v0.25.0
34
+ The MIT License (MIT)
35
+
36
+ Copyright (c) 2024 Amaan Qureshi <amaanq12@gmail.com>
37
+
38
+ Permission is hereby granted, free of charge, to any person obtaining a copy
39
+ of this software and associated documentation files (the "Software"), to deal
40
+ in the Software without restriction, including without limitation the rights
41
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
42
+ copies of the Software, and to permit persons to whom the Software is
43
+ furnished to do so, subject to the following conditions:
44
+
45
+ The above copyright notice and this permission notice shall be included in all
46
+ copies or substantial portions of the Software.
47
+
48
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
49
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
51
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
53
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54
+ SOFTWARE.
55
+
56
+
57
+ github.com/tree-sitter/tree-sitter-python@v0.25.0
58
+ The MIT License (MIT)
59
+
60
+ Copyright (c) 2016 Max Brunsfeld
61
+
62
+ Permission is hereby granted, free of charge, to any person obtaining a copy
63
+ of this software and associated documentation files (the "Software"), to deal
64
+ in the Software without restriction, including without limitation the rights
65
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
66
+ copies of the Software, and to permit persons to whom the Software is
67
+ furnished to do so, subject to the following conditions:
68
+
69
+ The above copyright notice and this permission notice shall be included in all
70
+ copies or substantial portions of the Software.
71
+
72
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
73
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
74
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
75
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
76
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
77
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
78
+ SOFTWARE.
79
+
80
+
81
+ github.com/gofrs/flock@v0.13.1
82
+ Copyright (c) 2018-2025, The Gofrs
83
+ Copyright (c) 2015-2020, Tim Heckman
84
+ All rights reserved.
85
+
86
+ Redistribution and use in source and binary forms, with or without
87
+ modification, are permitted provided that the following conditions are met:
88
+
89
+ * Redistributions of source code must retain the above copyright notice, this
90
+ list of conditions and the following disclaimer.
91
+
92
+ * Redistributions in binary form must reproduce the above copyright notice,
93
+ this list of conditions and the following disclaimer in the documentation
94
+ and/or other materials provided with the distribution.
95
+
96
+ * Neither the name of gofrs nor the names of its contributors may be used
97
+ to endorse or promote products derived from this software without
98
+ specific prior written permission.
99
+
100
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
101
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
102
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
103
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
104
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
105
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
106
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
107
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
108
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
109
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
110
+
111
+
112
+ github.com/mattn/go-pointer@v0.0.1
113
+ The MIT License (MIT)
114
+
115
+ Copyright (c) 2019 Yasuhiro Matsumoto
116
+
117
+ Permission is hereby granted, free of charge, to any person obtaining a copy
118
+ of this software and associated documentation files (the "Software"), to deal
119
+ in the Software without restriction, including without limitation the rights
120
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
121
+ copies of the Software, and to permit persons to whom the Software is
122
+ furnished to do so, subject to the following conditions:
123
+
124
+ The above copyright notice and this permission notice shall be included in all
125
+ copies or substantial portions of the Software.
126
+
127
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
128
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
129
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
130
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
131
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
132
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
133
+ SOFTWARE.
134
+
135
+
136
+ golang.org/x/sys@v0.47.0
137
+ Copyright 2009 The Go Authors.
138
+
139
+ Redistribution and use in source and binary forms, with or without
140
+ modification, are permitted provided that the following conditions are
141
+ met:
142
+
143
+ * Redistributions of source code must retain the above copyright
144
+ notice, this list of conditions and the following disclaimer.
145
+ * Redistributions in binary form must reproduce the above
146
+ copyright notice, this list of conditions and the following disclaimer
147
+ in the documentation and/or other materials provided with the
148
+ distribution.
149
+ * Neither the name of Google LLC nor the names of its
150
+ contributors may be used to endorse or promote products derived from
151
+ this software without specific prior written permission.
152
+
153
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
154
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
155
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
156
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
157
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
158
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
159
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
160
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
161
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
162
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
163
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
164
+
165
+
166
+ Tree-sitter Unicode data
167
+ COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
168
+
169
+ Copyright © 1991-2019 Unicode, Inc. All rights reserved.
170
+ Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
171
+
172
+ Permission is hereby granted, free of charge, to any person obtaining
173
+ a copy of the Unicode data files and any associated documentation
174
+ (the "Data Files") or Unicode software and any associated documentation
175
+ (the "Software") to deal in the Data Files or Software
176
+ without restriction, including without limitation the rights to use,
177
+ copy, modify, merge, publish, distribute, and/or sell copies of
178
+ the Data Files or Software, and to permit persons to whom the Data Files
179
+ or Software are furnished to do so, provided that either
180
+ (a) this copyright and permission notice appear with all copies
181
+ of the Data Files or Software, or
182
+ (b) this copyright and permission notice appear in associated
183
+ Documentation.
184
+
185
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
186
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
187
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
188
+ NONINFRINGEMENT OF THIRD PARTY RIGHTS.
189
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
190
+ NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
191
+ DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
192
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
193
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
194
+ PERFORMANCE OF THE DATA FILES OR SOFTWARE.
195
+
196
+ Except as contained in this notice, the name of a copyright holder
197
+ shall not be used in advertising or otherwise to promote the sale,
198
+ use or other dealings in these Data Files or Software without prior
199
+ written authorization of the copyright holder.
200
+
201
+ ---------------------
202
+
203
+ Third-Party Software Licenses
204
+
205
+ This section contains third-party software notices and/or additional
206
+ terms for licensed third-party software components included within ICU
207
+ libraries.
208
+
209
+ 1. ICU License - ICU 1.8.1 to ICU 57.1
210
+
211
+ COPYRIGHT AND PERMISSION NOTICE
212
+
213
+ Copyright (c) 1995-2016 International Business Machines Corporation and others
214
+ All rights reserved.
215
+
216
+ Permission is hereby granted, free of charge, to any person obtaining
217
+ a copy of this software and associated documentation files (the
218
+ "Software"), to deal in the Software without restriction, including
219
+ without limitation the rights to use, copy, modify, merge, publish,
220
+ distribute, and/or sell copies of the Software, and to permit persons
221
+ to whom the Software is furnished to do so, provided that the above
222
+ copyright notice(s) and this permission notice appear in all copies of
223
+ the Software and that both the above copyright notice(s) and this
224
+ permission notice appear in supporting documentation.
225
+
226
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
227
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
228
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
229
+ OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
230
+ HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY
231
+ SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
232
+ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
233
+ CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
234
+ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
235
+
236
+ Except as contained in this notice, the name of a copyright holder
237
+ shall not be used in advertising or otherwise to promote the sale, use
238
+ or other dealings in this Software without prior written authorization
239
+ of the copyright holder.
240
+
241
+ All trademarks and registered trademarks mentioned herein are the
242
+ property of their respective owners.
243
+
244
+ 2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt)
245
+
246
+ # The Google Chrome software developed by Google is licensed under
247
+ # the BSD license. Other software included in this distribution is
248
+ # provided under other licenses, as set forth below.
249
+ #
250
+ # The BSD License
251
+ # http://opensource.org/licenses/bsd-license.php
252
+ # Copyright (C) 2006-2008, Google Inc.
253
+ #
254
+ # All rights reserved.
255
+ #
256
+ # Redistribution and use in source and binary forms, with or without
257
+ # modification, are permitted provided that the following conditions are met:
258
+ #
259
+ # Redistributions of source code must retain the above copyright notice,
260
+ # this list of conditions and the following disclaimer.
261
+ # Redistributions in binary form must reproduce the above
262
+ # copyright notice, this list of conditions and the following
263
+ # disclaimer in the documentation and/or other materials provided with
264
+ # the distribution.
265
+ # Neither the name of Google Inc. nor the names of its
266
+ # contributors may be used to endorse or promote products derived from
267
+ # this software without specific prior written permission.
268
+ #
269
+ #
270
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
271
+ # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
272
+ # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
273
+ # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
274
+ # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
275
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
276
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
277
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
278
+ # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
279
+ # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
280
+ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
281
+ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282
+ #
283
+ #
284
+ # The word list in cjdict.txt are generated by combining three word lists
285
+ # listed below with further processing for compound word breaking. The
286
+ # frequency is generated with an iterative training against Google web
287
+ # corpora.
288
+ #
289
+ # * Libtabe (Chinese)
290
+ # - https://sourceforge.net/project/?group_id=1519
291
+ # - Its license terms and conditions are shown below.
292
+ #
293
+ # * IPADIC (Japanese)
294
+ # - http://chasen.aist-nara.ac.jp/chasen/distribution.html
295
+ # - Its license terms and conditions are shown below.
296
+ #
297
+ # ---------COPYING.libtabe ---- BEGIN--------------------
298
+ #
299
+ # /*
300
+ # * Copyright (c) 1999 TaBE Project.
301
+ # * Copyright (c) 1999 Pai-Hsiang Hsiao.
302
+ # * All rights reserved.
303
+ # *
304
+ # * Redistribution and use in source and binary forms, with or without
305
+ # * modification, are permitted provided that the following conditions
306
+ # * are met:
307
+ # *
308
+ # * . Redistributions of source code must retain the above copyright
309
+ # * notice, this list of conditions and the following disclaimer.
310
+ # * . Redistributions in binary form must reproduce the above copyright
311
+ # * notice, this list of conditions and the following disclaimer in
312
+ # * the documentation and/or other materials provided with the
313
+ # * distribution.
314
+ # * . Neither the name of the TaBE Project nor the names of its
315
+ # * contributors may be used to endorse or promote products derived
316
+ # * from this software without specific prior written permission.
317
+ # *
318
+ # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
319
+ # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
320
+ # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
321
+ # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
322
+ # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
323
+ # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
324
+ # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
325
+ # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
326
+ # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
327
+ # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
328
+ # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
329
+ # * OF THE POSSIBILITY OF SUCH DAMAGE.
330
+ # */
331
+ #
332
+ # /*
333
+ # * Copyright (c) 1999 Computer Systems and Communication Lab,
334
+ # * Institute of Information Science, Academia
335
+ # * Sinica. All rights reserved.
336
+ # *
337
+ # * Redistribution and use in source and binary forms, with or without
338
+ # * modification, are permitted provided that the following conditions
339
+ # * are met:
340
+ # *
341
+ # * . Redistributions of source code must retain the above copyright
342
+ # * notice, this list of conditions and the following disclaimer.
343
+ # * . Redistributions in binary form must reproduce the above copyright
344
+ # * notice, this list of conditions and the following disclaimer in
345
+ # * the documentation and/or other materials provided with the
346
+ # * distribution.
347
+ # * . Neither the name of the Computer Systems and Communication Lab
348
+ # * nor the names of its contributors may be used to endorse or
349
+ # * promote products derived from this software without specific
350
+ # * prior written permission.
351
+ # *
352
+ # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
353
+ # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
354
+ # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
355
+ # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
356
+ # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
357
+ # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
358
+ # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
359
+ # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
360
+ # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
361
+ # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
362
+ # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
363
+ # * OF THE POSSIBILITY OF SUCH DAMAGE.
364
+ # */
365
+ #
366
+ # Copyright 1996 Chih-Hao Tsai @ Beckman Institute,
367
+ # University of Illinois
368
+ # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4
369
+ #
370
+ # ---------------COPYING.libtabe-----END--------------------------------
371
+ #
372
+ #
373
+ # ---------------COPYING.ipadic-----BEGIN-------------------------------
374
+ #
375
+ # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science
376
+ # and Technology. All Rights Reserved.
377
+ #
378
+ # Use, reproduction, and distribution of this software is permitted.
379
+ # Any copy of this software, whether in its original form or modified,
380
+ # must include both the above copyright notice and the following
381
+ # paragraphs.
382
+ #
383
+ # Nara Institute of Science and Technology (NAIST),
384
+ # the copyright holders, disclaims all warranties with regard to this
385
+ # software, including all implied warranties of merchantability and
386
+ # fitness, in no event shall NAIST be liable for
387
+ # any special, indirect or consequential damages or any damages
388
+ # whatsoever resulting from loss of use, data or profits, whether in an
389
+ # action of contract, negligence or other tortuous action, arising out
390
+ # of or in connection with the use or performance of this software.
391
+ #
392
+ # A large portion of the dictionary entries
393
+ # originate from ICOT Free Software. The following conditions for ICOT
394
+ # Free Software applies to the current dictionary as well.
395
+ #
396
+ # Each User may also freely distribute the Program, whether in its
397
+ # original form or modified, to any third party or parties, PROVIDED
398
+ # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear
399
+ # on, or be attached to, the Program, which is distributed substantially
400
+ # in the same form as set out herein and that such intended
401
+ # distribution, if actually made, will neither violate or otherwise
402
+ # contravene any of the laws and regulations of the countries having
403
+ # jurisdiction over the User or the intended distribution itself.
404
+ #
405
+ # NO WARRANTY
406
+ #
407
+ # The program was produced on an experimental basis in the course of the
408
+ # research and development conducted during the project and is provided
409
+ # to users as so produced on an experimental basis. Accordingly, the
410
+ # program is provided without any warranty whatsoever, whether express,
411
+ # implied, statutory or otherwise. The term "warranty" used herein
412
+ # includes, but is not limited to, any warranty of the quality,
413
+ # performance, merchantability and fitness for a particular purpose of
414
+ # the program and the nonexistence of any infringement or violation of
415
+ # any right of any third party.
416
+ #
417
+ # Each user of the program will agree and understand, and be deemed to
418
+ # have agreed and understood, that there is no warranty whatsoever for
419
+ # the program and, accordingly, the entire risk arising from or
420
+ # otherwise connected with the program is assumed by the user.
421
+ #
422
+ # Therefore, neither ICOT, the copyright holder, or any other
423
+ # organization that participated in or was otherwise related to the
424
+ # development of the program and their respective officials, directors,
425
+ # officers and other employees shall be held liable for any and all
426
+ # damages, including, without limitation, general, special, incidental
427
+ # and consequential damages, arising out of or otherwise in connection
428
+ # with the use or inability to use the program or any product, material
429
+ # or result produced or otherwise obtained by using the program,
430
+ # regardless of whether they have been advised of, or otherwise had
431
+ # knowledge of, the possibility of such damages at any time during the
432
+ # project or thereafter. Each user will be deemed to have agreed to the
433
+ # foregoing by his or her commencement of use of the program. The term
434
+ # "use" as used herein includes, but is not limited to, the use,
435
+ # modification, copying and distribution of the program and the
436
+ # production of secondary products from the program.
437
+ #
438
+ # In the case where the program, whether in its original form or
439
+ # modified, was distributed or delivered to or received by a user from
440
+ # any person, organization or entity other than ICOT, unless it makes or
441
+ # grants independently of ICOT any specific warranty to the user in
442
+ # writing, such person, organization or entity, will also be exempted
443
+ # from and not be held liable to the user for any such damages as noted
444
+ # above as far as the program is concerned.
445
+ #
446
+ # ---------------COPYING.ipadic-----END----------------------------------
447
+
448
+ 3. Lao Word Break Dictionary Data (laodict.txt)
449
+
450
+ # Copyright (c) 2013 International Business Machines Corporation
451
+ # and others. All Rights Reserved.
452
+ #
453
+ # Project: http://code.google.com/p/lao-dictionary/
454
+ # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt
455
+ # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICENSE.txt
456
+ # (copied below)
457
+ #
458
+ # This file is derived from the above dictionary, with slight
459
+ # modifications.
460
+ # ----------------------------------------------------------------------
461
+ # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell.
462
+ # All rights reserved.
463
+ #
464
+ # Redistribution and use in source and binary forms, with or without
465
+ # modification,
466
+ # are permitted provided that the following conditions are met:
467
+ #
468
+ #
469
+ # Redistributions of source code must retain the above copyright notice, this
470
+ # list of conditions and the following disclaimer. Redistributions in
471
+ # binary form must reproduce the above copyright notice, this list of
472
+ # conditions and the following disclaimer in the documentation and/or
473
+ # other materials provided with the distribution.
474
+ #
475
+ #
476
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
477
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
478
+ # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
479
+ # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
480
+ # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
481
+ # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
482
+ # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
483
+ # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
484
+ # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
485
+ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
486
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
487
+ # OF THE POSSIBILITY OF SUCH DAMAGE.
488
+ # --------------------------------------------------------------------------
489
+
490
+ 4. Burmese Word Break Dictionary Data (burmesedict.txt)
491
+
492
+ # Copyright (c) 2014 International Business Machines Corporation
493
+ # and others. All Rights Reserved.
494
+ #
495
+ # This list is part of a project hosted at:
496
+ # github.com/kanyawtech/myanmar-karen-word-lists
497
+ #
498
+ # --------------------------------------------------------------------------
499
+ # Copyright (c) 2013, LeRoy Benjamin Sharon
500
+ # All rights reserved.
501
+ #
502
+ # Redistribution and use in source and binary forms, with or without
503
+ # modification, are permitted provided that the following conditions
504
+ # are met: Redistributions of source code must retain the above
505
+ # copyright notice, this list of conditions and the following
506
+ # disclaimer. Redistributions in binary form must reproduce the
507
+ # above copyright notice, this list of conditions and the following
508
+ # disclaimer in the documentation and/or other materials provided
509
+ # with the distribution.
510
+ #
511
+ # Neither the name Myanmar Karen Word Lists, nor the names of its
512
+ # contributors may be used to endorse or promote products derived
513
+ # from this software without specific prior written permission.
514
+ #
515
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
516
+ # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
517
+ # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
518
+ # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
519
+ # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
520
+ # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
521
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
522
+ # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
523
+ # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
524
+ # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
525
+ # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
526
+ # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
527
+ # SUCH DAMAGE.
528
+ # --------------------------------------------------------------------------
529
+
530
+ 5. Time Zone Database
531
+
532
+ ICU uses the public domain data and code derived from Time Zone
533
+ Database for its time zone support. The ownership of the TZ database
534
+ is explained in BCP 175: Procedure for Maintaining the Time Zone
535
+ Database section 7.
536
+
537
+ # 7. Database Ownership
538
+ #
539
+ # The TZ database itself is not an IETF Contribution or an IETF
540
+ # document. Rather it is a pre-existing and regularly updated work
541
+ # that is in the public domain, and is intended to remain in the
542
+ # public domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do
543
+ # not apply to the TZ Database or contributions that individuals make
544
+ # to it. Should any claims be made and substantiated against the TZ
545
+ # Database, the organization that is providing the IANA
546
+ # Considerations defined in this RFC, under the memorandum of
547
+ # understanding with the IETF, currently ICANN, may act in accordance
548
+ # with all competent court orders. No ownership claims will be made
549
+ # by ICANN or the IETF Trust on the database or the code. Any person
550
+ # making a contribution to the database or code waives all rights to
551
+ # future claims in that contribution or in the TZ Database.
552
+
553
+ 6. Google double-conversion
554
+
555
+ Copyright 2006-2011, the V8 project authors. All rights reserved.
556
+ Redistribution and use in source and binary forms, with or without
557
+ modification, are permitted provided that the following conditions are
558
+ met:
559
+
560
+ * Redistributions of source code must retain the above copyright
561
+ notice, this list of conditions and the following disclaimer.
562
+ * Redistributions in binary form must reproduce the above
563
+ copyright notice, this list of conditions and the following
564
+ disclaimer in the documentation and/or other materials provided
565
+ with the distribution.
566
+ * Neither the name of Google Inc. nor the names of its
567
+ contributors may be used to endorse or promote products derived
568
+ from this software without specific prior written permission.
569
+
570
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
571
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
572
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
573
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
574
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
575
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
576
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
577
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
578
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
579
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
580
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
581
+
582
+ Go standard library and runtime
583
+ Copyright 2009 The Go Authors.
584
+
585
+ Redistribution and use in source and binary forms, with or without
586
+ modification, are permitted provided that the following conditions are
587
+ met:
588
+
589
+ * Redistributions of source code must retain the above copyright
590
+ notice, this list of conditions and the following disclaimer.
591
+ * Redistributions in binary form must reproduce the above
592
+ copyright notice, this list of conditions and the following disclaimer
593
+ in the documentation and/or other materials provided with the
594
+ distribution.
595
+ * Neither the name of Google LLC nor the names of its
596
+ contributors may be used to endorse or promote products derived from
597
+ this software without specific prior written permission.
598
+
599
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
600
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
601
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
602
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
603
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
604
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
605
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
606
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
607
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
608
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
609
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
610
+
611
+
612
+ musl (Linux static runtime)
613
+ musl as a whole is licensed under the following standard MIT license:
614
+
615
+ ----------------------------------------------------------------------
616
+ Copyright © 2005-2020 Rich Felker, et al.
617
+
618
+ Permission is hereby granted, free of charge, to any person obtaining
619
+ a copy of this software and associated documentation files (the
620
+ "Software"), to deal in the Software without restriction, including
621
+ without limitation the rights to use, copy, modify, merge, publish,
622
+ distribute, sublicense, and/or sell copies of the Software, and to
623
+ permit persons to whom the Software is furnished to do so, subject to
624
+ the following conditions:
625
+
626
+ The above copyright notice and this permission notice shall be
627
+ included in all copies or substantial portions of the Software.
628
+
629
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
630
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
631
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
632
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
633
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
634
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
635
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
636
+ ----------------------------------------------------------------------
637
+
638
+ Authors/contributors include:
639
+
640
+ A. Wilcox
641
+ Ada Worcester
642
+ Alex Dowad
643
+ Alex Suykov
644
+ Alexander Monakov
645
+ Andre McCurdy
646
+ Andrew Kelley
647
+ Anthony G. Basile
648
+ Aric Belsito
649
+ Arvid Picciani
650
+ Bartosz Brachaczek
651
+ Benjamin Peterson
652
+ Bobby Bingham
653
+ Boris Brezillon
654
+ Brent Cook
655
+ Chris Spiegel
656
+ Clément Vasseur
657
+ Daniel Micay
658
+ Daniel Sabogal
659
+ Daurnimator
660
+ David Carlier
661
+ David Edelsohn
662
+ Denys Vlasenko
663
+ Dmitry Ivanov
664
+ Dmitry V. Levin
665
+ Drew DeVault
666
+ Emil Renner Berthing
667
+ Fangrui Song
668
+ Felix Fietkau
669
+ Felix Janda
670
+ Gianluca Anzolin
671
+ Hauke Mehrtens
672
+ He X
673
+ Hiltjo Posthuma
674
+ Isaac Dunham
675
+ Jaydeep Patil
676
+ Jens Gustedt
677
+ Jeremy Huntwork
678
+ Jo-Philipp Wich
679
+ Joakim Sindholt
680
+ John Spencer
681
+ Julien Ramseier
682
+ Justin Cormack
683
+ Kaarle Ritvanen
684
+ Khem Raj
685
+ Kylie McClain
686
+ Leah Neukirchen
687
+ Luca Barbato
688
+ Luka Perkov
689
+ M Farkas-Dyck (Strake)
690
+ Mahesh Bodapati
691
+ Markus Wichmann
692
+ Masanori Ogino
693
+ Michael Clark
694
+ Michael Forney
695
+ Mikhail Kremnyov
696
+ Natanael Copa
697
+ Nicholas J. Kain
698
+ orc
699
+ Pascal Cuoq
700
+ Patrick Oppenlander
701
+ Petr Hosek
702
+ Petr Skocik
703
+ Pierre Carrier
704
+ Reini Urban
705
+ Rich Felker
706
+ Richard Pennington
707
+ Ryan Fairfax
708
+ Samuel Holland
709
+ Segev Finer
710
+ Shiz
711
+ sin
712
+ Solar Designer
713
+ Stefan Kristiansson
714
+ Stefan O'Rear
715
+ Szabolcs Nagy
716
+ Timo Teräs
717
+ Trutz Behn
718
+ Valentin Ochs
719
+ Will Dietz
720
+ William Haddon
721
+ William Pitcock
722
+
723
+ Portions of this software are derived from third-party works licensed
724
+ under terms compatible with the above MIT license:
725
+
726
+ The TRE regular expression implementation (src/regex/reg* and
727
+ src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed
728
+ under a 2-clause BSD license (license text in the source files). The
729
+ included version has been heavily modified by Rich Felker in 2012, in
730
+ the interests of size, simplicity, and namespace cleanliness.
731
+
732
+ Much of the math library code (src/math/* and src/complex/*) is
733
+ Copyright © 1993,2004 Sun Microsystems or
734
+ Copyright © 2003-2011 David Schultz or
735
+ Copyright © 2003-2009 Steven G. Kargl or
736
+ Copyright © 2003-2009 Bruce D. Evans or
737
+ Copyright © 2008 Stephen L. Moshier or
738
+ Copyright © 2017-2018 Arm Limited
739
+ and labelled as such in comments in the individual source files. All
740
+ have been licensed under extremely permissive terms.
741
+
742
+ The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008
743
+ The Android Open Source Project and is licensed under a two-clause BSD
744
+ license. It was taken from Bionic libc, used on Android.
745
+
746
+ The AArch64 memcpy and memset code (src/string/aarch64/*) are
747
+ Copyright © 1999-2019, Arm Limited.
748
+
749
+ The implementation of DES for crypt (src/crypt/crypt_des.c) is
750
+ Copyright © 1994 David Burren. It is licensed under a BSD license.
751
+
752
+ The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was
753
+ originally written by Solar Designer and placed into the public
754
+ domain. The code also comes with a fallback permissive license for use
755
+ in jurisdictions that may not recognize the public domain.
756
+
757
+ The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011
758
+ Valentin Ochs and is licensed under an MIT-style license.
759
+
760
+ The x86_64 port was written by Nicholas J. Kain and is licensed under
761
+ the standard MIT terms.
762
+
763
+ The mips and microblaze ports were originally written by Richard
764
+ Pennington for use in the ellcc project. The original code was adapted
765
+ by Rich Felker for build system and code conventions during upstream
766
+ integration. It is licensed under the standard MIT terms.
767
+
768
+ The mips64 port was contributed by Imagination Technologies and is
769
+ licensed under the standard MIT terms.
770
+
771
+ The powerpc port was also originally written by Richard Pennington,
772
+ and later supplemented and integrated by John Spencer. It is licensed
773
+ under the standard MIT terms.
774
+
775
+ All other files which have no copyright comments are original works
776
+ produced specifically for use as part of this library, written either
777
+ by Rich Felker, the main author of the library, or by one or more
778
+ contibutors listed above. Details on authorship of individual files
779
+ can be found in the git version control history of the project. The
780
+ omission of copyright and license comments in each file is in the
781
+ interest of source tree size.
782
+
783
+ In addition, permission is hereby granted for all public header files
784
+ (include/* and arch/*/bits/*) and crt files intended to be linked into
785
+ applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit
786
+ the copyright notice and permission notice otherwise required by the
787
+ license, and to use these files without any requirement of
788
+ attribution. These files include substantial contributions from:
789
+
790
+ Bobby Bingham
791
+ John Spencer
792
+ Nicholas J. Kain
793
+ Rich Felker
794
+ Richard Pennington
795
+ Stefan Kristiansson
796
+ Szabolcs Nagy
797
+
798
+ all of whom have explicitly granted such permission.
799
+
800
+ This file previously contained text expressing a belief that most of
801
+ the files covered by the above exception were sufficiently trivial not
802
+ to be subject to copyright, resulting in confusion over whether it
803
+ negated the permissions granted in the license. In the spirit of
804
+ permissive licensing, and of not having licensing issues being an
805
+ obstacle to adoption, that text has been removed.
806
+
807
+
808
+ mingw-w64 (Windows runtime)
809
+ With exception of certain parts that are prominently marked as being
810
+ in the Public Domain, BSD, or LGPL this Software is provided under the
811
+ Zope Public License (ZPL) Version 2.1.
812
+
813
+ Copyright (c) 2009 - 2013 by the mingw-w64 project
814
+
815
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
816
+
817
+ This license has been certified as open source. It has also been designated
818
+ as GPL compatible by the Free Software Foundation (FSF).
819
+
820
+ Redistribution and use in source and binary forms, with or without
821
+ modification, are permitted provided that the following conditions are met:
822
+
823
+ 1. Redistributions in source code must retain the accompanying copyright
824
+ notice, this list of conditions, and the following disclaimer.
825
+ 2. Redistributions in binary form must reproduce the accompanying
826
+ copyright notice, this list of conditions, and the following disclaimer
827
+ in the documentation and/or other materials provided with the
828
+ distribution.
829
+ 3. Names of the copyright holders must not be used to endorse or promote
830
+ products derived from this software without prior written permission
831
+ from the copyright holders.
832
+ 4. The right to distribute this software or to use it for any purpose does
833
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
834
+ the copyright holders. Use of them is covered by separate agreement
835
+ with the copyright holders.
836
+ 5. If any files are modified, you must cause the modified files to carry
837
+ prominent notices stating that you changed the files and the date of
838
+ any change.
839
+
840
+ Disclaimer
841
+
842
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
843
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
844
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
845
+ EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
846
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
847
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
848
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
849
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
850
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
851
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
852
+
853
+
854
+ Zig compiler runtime
855
+ The MIT License (Expat)
856
+
857
+ Copyright (c) Zig contributors
858
+
859
+ Permission is hereby granted, free of charge, to any person obtaining a copy
860
+ of this software and associated documentation files (the "Software"), to deal
861
+ in the Software without restriction, including without limitation the rights
862
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
863
+ copies of the Software, and to permit persons to whom the Software is
864
+ furnished to do so, subject to the following conditions:
865
+
866
+ The above copyright notice and this permission notice shall be included in
867
+ all copies or substantial portions of the Software.
868
+
869
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
870
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
871
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
872
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
873
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
874
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
875
+ THE SOFTWARE.
876
+
Binary file
Binary file
Binary file
@@ -0,0 +1,3 @@
1
+ - insert:
2
+ - id: stop-pushing-shit
3
+ name: dsh-stop-pushing-shit
package/index.js ADDED
@@ -0,0 +1,153 @@
1
+ import { spawnSync } from 'node:child_process';
2
+ import { randomUUID } from 'node:crypto';
3
+ import { homedir } from 'node:os';
4
+ import { dirname, isAbsolute, join, resolve, sep } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ export const name = 'stop-pushing-shit';
8
+ export const inject = ['tools', 'agents', 'systemPrompt'];
9
+
10
+ const root = dirname(fileURLToPath(import.meta.url));
11
+ const failure = 'STOP-PUSHING-SHIT: guard unavailable; tool execution denied.';
12
+
13
+ export function apply(ctx, config = {}) {
14
+ const binary = config.binary ?? join(root, 'bin', `${process.platform}-${process.arch}`,
15
+ process.platform === 'win32' ? 'issue-pr-guard.exe' : 'issue-pr-guard');
16
+ const dataDir = config.dataDir ?? join(process.env.DSH_HOME || join(homedir(), '.dsh'),
17
+ 'data', 'stop-pushing-shit');
18
+ const sessions = new WeakMap();
19
+
20
+ function run(event) {
21
+ if (!isAbsolute(binary) || !isAbsolute(dataDir)) throw new Error(failure);
22
+ const input = JSON.stringify(event);
23
+ if (Buffer.byteLength(input) > 16 << 20) throw new Error(failure);
24
+ const result = spawnSync(binary, [], {
25
+ input, encoding: 'utf8', shell: false, timeout: 3000, killSignal: 'SIGKILL',
26
+ maxBuffer: 16 << 20, windowsHide: true,
27
+ env: { ...process.env, PLUGIN_DATA: dataDir },
28
+ });
29
+ if (result.error || result.status !== 0 || result.signal) throw new Error(failure);
30
+ const output = JSON.parse(result.stdout);
31
+ if (!output || typeof output !== 'object' || Array.isArray(output)) throw new Error(failure);
32
+ if (Object.keys(output).length === 0) return output;
33
+ const hook = output.hookSpecificOutput;
34
+ if (!hook || hook.hookEventName !== event.hook_event_name) throw new Error(failure);
35
+ if (event.hook_event_name === 'PreToolUse') {
36
+ if (hook.permissionDecision !== 'deny' || typeof hook.permissionDecisionReason !== 'string') {
37
+ throw new Error(failure);
38
+ }
39
+ } else if (typeof hook.additionalContext !== 'string') {
40
+ throw new Error(failure);
41
+ }
42
+ return output;
43
+ }
44
+
45
+ function eventFor(session, type, extra = {}) {
46
+ return {
47
+ hook_event_name: type, session_id: session.id,
48
+ turn_id: sessions.get(session)?.turn ?? '', ...extra,
49
+ };
50
+ }
51
+
52
+ function initialize(session) {
53
+ const lastDirectory = session.snapshotEvents().findLast(e => e.type === 'working-directory/change');
54
+ const state = { turn: '', error: null, cwd: lastDirectory?.data.cwd ?? session.header.cwd };
55
+ sessions.set(session, state);
56
+ try {
57
+ run(eventFor(session, 'SessionStart'));
58
+ } catch (error) {
59
+ state.error = error;
60
+ }
61
+ return state;
62
+ }
63
+
64
+ // Register the denial gate before probing the executable: a broken install
65
+ // remains restrictive even when the host contains plugin startup errors.
66
+ ctx.tools.guard((exec) => {
67
+ const agent = exec.agent;
68
+ const state = agent && sessions.get(agent.session);
69
+ if (!agent || ctx.agents.get(agent.id) !== agent || agent.status !== 'running' ||
70
+ !state?.turn || state.error || exec.signal.aborted) return failure;
71
+ try {
72
+ const args = exec.arguments;
73
+ let tool = exec.name;
74
+ let input = args;
75
+ let cwd = ctx.get('workingDirectory')?.get(agent.session) ?? state.cwd;
76
+ // DSH drops the original MCP name from ToolExecution when it shortens
77
+ // or normalizes names. Never classify that lossy public name as a read.
78
+ if (/^mcp__.*_[0-9a-f]{12}$/.test(tool)) {
79
+ return 'STOP-PUSHING-SHIT: DSH renamed this MCP tool; its original operation cannot be verified. Use a shorter server name and an unmodified tool name.';
80
+ }
81
+ if (tool === 'terminal_open' || tool === 'terminal_send') {
82
+ return 'STOP-PUSHING-SHIT: interactive terminal input cannot be checked as a complete command. Use the standard bash or pwsh tool.';
83
+ }
84
+ if (tool === 'bash' || tool === 'pwsh') {
85
+ const definition = ctx.tools.get(tool, agent);
86
+ if (!definition?.parameters?.properties?.workdir) {
87
+ return 'STOP-PUSHING-SHIT: persistent shells are unsupported. Use dsh-tool-bash or dsh-tool-pwsh (one command per process).';
88
+ }
89
+ if (!args || typeof args.command !== 'string' || !isAbsolute(cwd ?? '')) return failure;
90
+ if (args.workdir !== undefined) {
91
+ if (typeof args.workdir !== 'string' || args.workdir.length === 0) return failure;
92
+ // Match each official tool: bash preserves traversal; pwsh resolves relative paths.
93
+ cwd = isAbsolute(args.workdir) ? args.workdir
94
+ : tool === 'pwsh' ? resolve(cwd, args.workdir) : `${cwd}${sep}${args.workdir}`;
95
+ }
96
+ // Retain every original argument and the actual tool name in the Go
97
+ // target binding while using its existing shell-command classifier.
98
+ tool = 'Bash';
99
+ input = { command: args.command, dsh_tool: exec.name, dsh_arguments: args };
100
+ }
101
+ if (!isAbsolute(cwd ?? '')) return failure;
102
+ const output = run(eventFor(agent.session, 'PreToolUse', {
103
+ cwd, tool_name: tool, tool_input: input,
104
+ }));
105
+ return output.hookSpecificOutput?.permissionDecisionReason;
106
+ } catch (error) {
107
+ state.error = error;
108
+ return failure;
109
+ }
110
+ });
111
+
112
+ ctx.on('agent/created', ({ agent }) => {
113
+ initialize(agent.session);
114
+ });
115
+ ctx.on('session/event', (session, event) => {
116
+ if (!['turn/start', 'turn/end', 'user/message', 'working-directory/change'].includes(event.type)) return;
117
+ let state = sessions.get(session);
118
+ if (!state) state = initialize(session);
119
+ try {
120
+ if (event.type === 'working-directory/change') {
121
+ state.cwd = event.data.cwd;
122
+ } else if (event.type === 'turn/start') {
123
+ state.turn = randomUUID();
124
+ run(eventFor(session, 'Interrupt'));
125
+ state.error = null;
126
+ } else if (event.type === 'turn/end') {
127
+ state.turn = '';
128
+ run(eventFor(session, 'Interrupt'));
129
+ } else if (event.data.source?.kind === 'user') {
130
+ const agent = ctx.agents.get(session.id);
131
+ const message = event.data;
132
+ const direct = agent && ctx.agents.roots().includes(agent) &&
133
+ session.header.origin !== 'subagent';
134
+ const text = direct && message.role === 'user' && message.content.length === 1 &&
135
+ message.content[0].type === 'text' ? message.content[0].text : '';
136
+ run(eventFor(session, 'UserPromptSubmit', { prompt: text }));
137
+ }
138
+ } catch (error) {
139
+ state.error = error;
140
+ }
141
+ });
142
+ // No second copy of the policy text in the adapter.
143
+ ctx.systemPrompt.section({
144
+ name, order: 5, interpolate: false,
145
+ text: () => {
146
+ try {
147
+ return run({ hook_event_name: 'SubagentStart' }).hookSpecificOutput.additionalContext;
148
+ } catch {
149
+ return failure;
150
+ }
151
+ },
152
+ });
153
+ }
package/package.json CHANGED
@@ -1,6 +1,22 @@
1
1
  {
2
2
  "name": "dsh-stop-pushing-shit",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.2",
4
+ "description": "Require one explicit human authorization for each GitHub creation or git push.",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "exports": {
8
+ ".": "./index.js",
9
+ "./cordis.patch.yml": "./cordis.patch.yml",
10
+ "./package.json": "./package.json"
11
+ },
12
+ "files": ["index.js", "cordis.patch.yml", "bin", "README.md", "LICENSE", "THIRD_PARTY_NOTICES.txt"],
13
+ "engines": { "node": ">=24.9" },
14
+ "license": "MIT",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/321sssrt-bit/STOP-PUSHING-SHIT.git",
18
+ "directory": "plugins/dsh"
19
+ },
20
+ "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" },
21
+ "dsh": { "bundle": { "patch": "./cordis.patch.yml" } }
22
+ }