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

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.3。创建 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.3
14
+ ```
15
+
16
+ Windows PowerShell 将 `dsh` 换成 `dsh.cmd`。升级时使用目标版本运行同一条命令。
17
+ 安装时不会从 GitHub 或开发者服务器额外下载程序。
18
+
19
+ ### GitHub Release 备用安装
20
+
21
+ 从 [DSH 0.1.3 Release](https://github.com/321sssrt-bit/STOP-PUSHING-SHIT/releases/tag/dsh-v0.1.3)
22
+ 下载 `dsh-stop-pushing-shit-0.1.3.tgz`,它与 npm 发布使用同一个文件;也可按平台下载更小的包:
23
+
24
+ - macOS Apple Silicon:`dsh-stop-pushing-shit-0.1.3-darwin-arm64.tgz`
25
+ - Linux ARM64:`dsh-stop-pushing-shit-0.1.3-linux-arm64.tgz`
26
+ - Windows x64:`dsh-stop-pushing-shit-0.1.3-windows-amd64.tgz`
27
+
28
+ 在终端运行,路径替换为下载或本地构建的包:
29
+
30
+ ```sh
31
+ dsh plugin --profile web add /absolute/path/dsh-stop-pushing-shit-0.1.3.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.3.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.3
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,900 @@
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-javascript@v0.23.1
58
+ The MIT License (MIT)
59
+
60
+ Copyright (c) 2014 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/tree-sitter/tree-sitter-python@v0.25.0
82
+ The MIT License (MIT)
83
+
84
+ Copyright (c) 2016 Max Brunsfeld
85
+
86
+ Permission is hereby granted, free of charge, to any person obtaining a copy
87
+ of this software and associated documentation files (the "Software"), to deal
88
+ in the Software without restriction, including without limitation the rights
89
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
90
+ copies of the Software, and to permit persons to whom the Software is
91
+ furnished to do so, subject to the following conditions:
92
+
93
+ The above copyright notice and this permission notice shall be included in all
94
+ copies or substantial portions of the Software.
95
+
96
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
97
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
98
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
99
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
100
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
101
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
102
+ SOFTWARE.
103
+
104
+
105
+ github.com/gofrs/flock@v0.13.1
106
+ Copyright (c) 2018-2025, The Gofrs
107
+ Copyright (c) 2015-2020, Tim Heckman
108
+ All rights reserved.
109
+
110
+ Redistribution and use in source and binary forms, with or without
111
+ modification, are permitted provided that the following conditions are met:
112
+
113
+ * Redistributions of source code must retain the above copyright notice, this
114
+ list of conditions and the following disclaimer.
115
+
116
+ * Redistributions in binary form must reproduce the above copyright notice,
117
+ this list of conditions and the following disclaimer in the documentation
118
+ and/or other materials provided with the distribution.
119
+
120
+ * Neither the name of gofrs nor the names of its contributors may be used
121
+ to endorse or promote products derived from this software without
122
+ specific prior written permission.
123
+
124
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
125
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
126
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
127
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
128
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
129
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
130
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
131
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
132
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
133
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
134
+
135
+
136
+ github.com/mattn/go-pointer@v0.0.1
137
+ The MIT License (MIT)
138
+
139
+ Copyright (c) 2019 Yasuhiro Matsumoto
140
+
141
+ Permission is hereby granted, free of charge, to any person obtaining a copy
142
+ of this software and associated documentation files (the "Software"), to deal
143
+ in the Software without restriction, including without limitation the rights
144
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
145
+ copies of the Software, and to permit persons to whom the Software is
146
+ furnished to do so, subject to the following conditions:
147
+
148
+ The above copyright notice and this permission notice shall be included in all
149
+ copies or substantial portions of the Software.
150
+
151
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
152
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
153
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
154
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
155
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
156
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
157
+ SOFTWARE.
158
+
159
+
160
+ golang.org/x/sys@v0.47.0
161
+ Copyright 2009 The Go Authors.
162
+
163
+ Redistribution and use in source and binary forms, with or without
164
+ modification, are permitted provided that the following conditions are
165
+ met:
166
+
167
+ * Redistributions of source code must retain the above copyright
168
+ notice, this list of conditions and the following disclaimer.
169
+ * Redistributions in binary form must reproduce the above
170
+ copyright notice, this list of conditions and the following disclaimer
171
+ in the documentation and/or other materials provided with the
172
+ distribution.
173
+ * Neither the name of Google LLC nor the names of its
174
+ contributors may be used to endorse or promote products derived from
175
+ this software without specific prior written permission.
176
+
177
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
178
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
179
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
180
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
181
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
182
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
183
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
184
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
185
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
186
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
187
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
188
+
189
+
190
+ Tree-sitter Unicode data
191
+ COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
192
+
193
+ Copyright © 1991-2019 Unicode, Inc. All rights reserved.
194
+ Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
195
+
196
+ Permission is hereby granted, free of charge, to any person obtaining
197
+ a copy of the Unicode data files and any associated documentation
198
+ (the "Data Files") or Unicode software and any associated documentation
199
+ (the "Software") to deal in the Data Files or Software
200
+ without restriction, including without limitation the rights to use,
201
+ copy, modify, merge, publish, distribute, and/or sell copies of
202
+ the Data Files or Software, and to permit persons to whom the Data Files
203
+ or Software are furnished to do so, provided that either
204
+ (a) this copyright and permission notice appear with all copies
205
+ of the Data Files or Software, or
206
+ (b) this copyright and permission notice appear in associated
207
+ Documentation.
208
+
209
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
210
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
211
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
212
+ NONINFRINGEMENT OF THIRD PARTY RIGHTS.
213
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
214
+ NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
215
+ DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
216
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
217
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
218
+ PERFORMANCE OF THE DATA FILES OR SOFTWARE.
219
+
220
+ Except as contained in this notice, the name of a copyright holder
221
+ shall not be used in advertising or otherwise to promote the sale,
222
+ use or other dealings in these Data Files or Software without prior
223
+ written authorization of the copyright holder.
224
+
225
+ ---------------------
226
+
227
+ Third-Party Software Licenses
228
+
229
+ This section contains third-party software notices and/or additional
230
+ terms for licensed third-party software components included within ICU
231
+ libraries.
232
+
233
+ 1. ICU License - ICU 1.8.1 to ICU 57.1
234
+
235
+ COPYRIGHT AND PERMISSION NOTICE
236
+
237
+ Copyright (c) 1995-2016 International Business Machines Corporation and others
238
+ All rights reserved.
239
+
240
+ Permission is hereby granted, free of charge, to any person obtaining
241
+ a copy of this software and associated documentation files (the
242
+ "Software"), to deal in the Software without restriction, including
243
+ without limitation the rights to use, copy, modify, merge, publish,
244
+ distribute, and/or sell copies of the Software, and to permit persons
245
+ to whom the Software is furnished to do so, provided that the above
246
+ copyright notice(s) and this permission notice appear in all copies of
247
+ the Software and that both the above copyright notice(s) and this
248
+ permission notice appear in supporting documentation.
249
+
250
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
251
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
252
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
253
+ OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
254
+ HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY
255
+ SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
256
+ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
257
+ CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
258
+ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
259
+
260
+ Except as contained in this notice, the name of a copyright holder
261
+ shall not be used in advertising or otherwise to promote the sale, use
262
+ or other dealings in this Software without prior written authorization
263
+ of the copyright holder.
264
+
265
+ All trademarks and registered trademarks mentioned herein are the
266
+ property of their respective owners.
267
+
268
+ 2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt)
269
+
270
+ # The Google Chrome software developed by Google is licensed under
271
+ # the BSD license. Other software included in this distribution is
272
+ # provided under other licenses, as set forth below.
273
+ #
274
+ # The BSD License
275
+ # http://opensource.org/licenses/bsd-license.php
276
+ # Copyright (C) 2006-2008, Google Inc.
277
+ #
278
+ # All rights reserved.
279
+ #
280
+ # Redistribution and use in source and binary forms, with or without
281
+ # modification, are permitted provided that the following conditions are met:
282
+ #
283
+ # Redistributions of source code must retain the above copyright notice,
284
+ # this list of conditions and the following disclaimer.
285
+ # Redistributions in binary form must reproduce the above
286
+ # copyright notice, this list of conditions and the following
287
+ # disclaimer in the documentation and/or other materials provided with
288
+ # the distribution.
289
+ # Neither the name of Google Inc. nor the names of its
290
+ # contributors may be used to endorse or promote products derived from
291
+ # this software without specific prior written permission.
292
+ #
293
+ #
294
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
295
+ # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
296
+ # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
297
+ # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
298
+ # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
299
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
300
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
301
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
302
+ # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
303
+ # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
304
+ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
305
+ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
306
+ #
307
+ #
308
+ # The word list in cjdict.txt are generated by combining three word lists
309
+ # listed below with further processing for compound word breaking. The
310
+ # frequency is generated with an iterative training against Google web
311
+ # corpora.
312
+ #
313
+ # * Libtabe (Chinese)
314
+ # - https://sourceforge.net/project/?group_id=1519
315
+ # - Its license terms and conditions are shown below.
316
+ #
317
+ # * IPADIC (Japanese)
318
+ # - http://chasen.aist-nara.ac.jp/chasen/distribution.html
319
+ # - Its license terms and conditions are shown below.
320
+ #
321
+ # ---------COPYING.libtabe ---- BEGIN--------------------
322
+ #
323
+ # /*
324
+ # * Copyright (c) 1999 TaBE Project.
325
+ # * Copyright (c) 1999 Pai-Hsiang Hsiao.
326
+ # * All rights reserved.
327
+ # *
328
+ # * Redistribution and use in source and binary forms, with or without
329
+ # * modification, are permitted provided that the following conditions
330
+ # * are met:
331
+ # *
332
+ # * . Redistributions of source code must retain the above copyright
333
+ # * notice, this list of conditions and the following disclaimer.
334
+ # * . Redistributions in binary form must reproduce the above copyright
335
+ # * notice, this list of conditions and the following disclaimer in
336
+ # * the documentation and/or other materials provided with the
337
+ # * distribution.
338
+ # * . Neither the name of the TaBE Project nor the names of its
339
+ # * contributors may be used to endorse or promote products derived
340
+ # * from this software without specific prior written permission.
341
+ # *
342
+ # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
343
+ # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
344
+ # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
345
+ # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
346
+ # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
347
+ # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
348
+ # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
349
+ # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
350
+ # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
351
+ # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
352
+ # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
353
+ # * OF THE POSSIBILITY OF SUCH DAMAGE.
354
+ # */
355
+ #
356
+ # /*
357
+ # * Copyright (c) 1999 Computer Systems and Communication Lab,
358
+ # * Institute of Information Science, Academia
359
+ # * Sinica. All rights reserved.
360
+ # *
361
+ # * Redistribution and use in source and binary forms, with or without
362
+ # * modification, are permitted provided that the following conditions
363
+ # * are met:
364
+ # *
365
+ # * . Redistributions of source code must retain the above copyright
366
+ # * notice, this list of conditions and the following disclaimer.
367
+ # * . Redistributions in binary form must reproduce the above copyright
368
+ # * notice, this list of conditions and the following disclaimer in
369
+ # * the documentation and/or other materials provided with the
370
+ # * distribution.
371
+ # * . Neither the name of the Computer Systems and Communication Lab
372
+ # * nor the names of its contributors may be used to endorse or
373
+ # * promote products derived from this software without specific
374
+ # * prior written permission.
375
+ # *
376
+ # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
377
+ # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
378
+ # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
379
+ # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
380
+ # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
381
+ # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
382
+ # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
383
+ # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
384
+ # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
385
+ # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
386
+ # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
387
+ # * OF THE POSSIBILITY OF SUCH DAMAGE.
388
+ # */
389
+ #
390
+ # Copyright 1996 Chih-Hao Tsai @ Beckman Institute,
391
+ # University of Illinois
392
+ # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4
393
+ #
394
+ # ---------------COPYING.libtabe-----END--------------------------------
395
+ #
396
+ #
397
+ # ---------------COPYING.ipadic-----BEGIN-------------------------------
398
+ #
399
+ # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science
400
+ # and Technology. All Rights Reserved.
401
+ #
402
+ # Use, reproduction, and distribution of this software is permitted.
403
+ # Any copy of this software, whether in its original form or modified,
404
+ # must include both the above copyright notice and the following
405
+ # paragraphs.
406
+ #
407
+ # Nara Institute of Science and Technology (NAIST),
408
+ # the copyright holders, disclaims all warranties with regard to this
409
+ # software, including all implied warranties of merchantability and
410
+ # fitness, in no event shall NAIST be liable for
411
+ # any special, indirect or consequential damages or any damages
412
+ # whatsoever resulting from loss of use, data or profits, whether in an
413
+ # action of contract, negligence or other tortuous action, arising out
414
+ # of or in connection with the use or performance of this software.
415
+ #
416
+ # A large portion of the dictionary entries
417
+ # originate from ICOT Free Software. The following conditions for ICOT
418
+ # Free Software applies to the current dictionary as well.
419
+ #
420
+ # Each User may also freely distribute the Program, whether in its
421
+ # original form or modified, to any third party or parties, PROVIDED
422
+ # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear
423
+ # on, or be attached to, the Program, which is distributed substantially
424
+ # in the same form as set out herein and that such intended
425
+ # distribution, if actually made, will neither violate or otherwise
426
+ # contravene any of the laws and regulations of the countries having
427
+ # jurisdiction over the User or the intended distribution itself.
428
+ #
429
+ # NO WARRANTY
430
+ #
431
+ # The program was produced on an experimental basis in the course of the
432
+ # research and development conducted during the project and is provided
433
+ # to users as so produced on an experimental basis. Accordingly, the
434
+ # program is provided without any warranty whatsoever, whether express,
435
+ # implied, statutory or otherwise. The term "warranty" used herein
436
+ # includes, but is not limited to, any warranty of the quality,
437
+ # performance, merchantability and fitness for a particular purpose of
438
+ # the program and the nonexistence of any infringement or violation of
439
+ # any right of any third party.
440
+ #
441
+ # Each user of the program will agree and understand, and be deemed to
442
+ # have agreed and understood, that there is no warranty whatsoever for
443
+ # the program and, accordingly, the entire risk arising from or
444
+ # otherwise connected with the program is assumed by the user.
445
+ #
446
+ # Therefore, neither ICOT, the copyright holder, or any other
447
+ # organization that participated in or was otherwise related to the
448
+ # development of the program and their respective officials, directors,
449
+ # officers and other employees shall be held liable for any and all
450
+ # damages, including, without limitation, general, special, incidental
451
+ # and consequential damages, arising out of or otherwise in connection
452
+ # with the use or inability to use the program or any product, material
453
+ # or result produced or otherwise obtained by using the program,
454
+ # regardless of whether they have been advised of, or otherwise had
455
+ # knowledge of, the possibility of such damages at any time during the
456
+ # project or thereafter. Each user will be deemed to have agreed to the
457
+ # foregoing by his or her commencement of use of the program. The term
458
+ # "use" as used herein includes, but is not limited to, the use,
459
+ # modification, copying and distribution of the program and the
460
+ # production of secondary products from the program.
461
+ #
462
+ # In the case where the program, whether in its original form or
463
+ # modified, was distributed or delivered to or received by a user from
464
+ # any person, organization or entity other than ICOT, unless it makes or
465
+ # grants independently of ICOT any specific warranty to the user in
466
+ # writing, such person, organization or entity, will also be exempted
467
+ # from and not be held liable to the user for any such damages as noted
468
+ # above as far as the program is concerned.
469
+ #
470
+ # ---------------COPYING.ipadic-----END----------------------------------
471
+
472
+ 3. Lao Word Break Dictionary Data (laodict.txt)
473
+
474
+ # Copyright (c) 2013 International Business Machines Corporation
475
+ # and others. All Rights Reserved.
476
+ #
477
+ # Project: http://code.google.com/p/lao-dictionary/
478
+ # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt
479
+ # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICENSE.txt
480
+ # (copied below)
481
+ #
482
+ # This file is derived from the above dictionary, with slight
483
+ # modifications.
484
+ # ----------------------------------------------------------------------
485
+ # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell.
486
+ # All rights reserved.
487
+ #
488
+ # Redistribution and use in source and binary forms, with or without
489
+ # modification,
490
+ # are permitted provided that the following conditions are met:
491
+ #
492
+ #
493
+ # Redistributions of source code must retain the above copyright notice, this
494
+ # list of conditions and the following disclaimer. Redistributions in
495
+ # binary form must reproduce the above copyright notice, this list of
496
+ # conditions and the following disclaimer in the documentation and/or
497
+ # other materials provided with the distribution.
498
+ #
499
+ #
500
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
501
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
502
+ # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
503
+ # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
504
+ # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
505
+ # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
506
+ # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
507
+ # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
508
+ # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
509
+ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
510
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
511
+ # OF THE POSSIBILITY OF SUCH DAMAGE.
512
+ # --------------------------------------------------------------------------
513
+
514
+ 4. Burmese Word Break Dictionary Data (burmesedict.txt)
515
+
516
+ # Copyright (c) 2014 International Business Machines Corporation
517
+ # and others. All Rights Reserved.
518
+ #
519
+ # This list is part of a project hosted at:
520
+ # github.com/kanyawtech/myanmar-karen-word-lists
521
+ #
522
+ # --------------------------------------------------------------------------
523
+ # Copyright (c) 2013, LeRoy Benjamin Sharon
524
+ # All rights reserved.
525
+ #
526
+ # Redistribution and use in source and binary forms, with or without
527
+ # modification, are permitted provided that the following conditions
528
+ # are met: Redistributions of source code must retain the above
529
+ # copyright notice, this list of conditions and the following
530
+ # disclaimer. Redistributions in binary form must reproduce the
531
+ # above copyright notice, this list of conditions and the following
532
+ # disclaimer in the documentation and/or other materials provided
533
+ # with the distribution.
534
+ #
535
+ # Neither the name Myanmar Karen Word Lists, nor the names of its
536
+ # contributors may be used to endorse or promote products derived
537
+ # from this software without specific prior written permission.
538
+ #
539
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
540
+ # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
541
+ # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
542
+ # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
543
+ # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
544
+ # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
545
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
546
+ # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
547
+ # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
548
+ # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
549
+ # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
550
+ # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
551
+ # SUCH DAMAGE.
552
+ # --------------------------------------------------------------------------
553
+
554
+ 5. Time Zone Database
555
+
556
+ ICU uses the public domain data and code derived from Time Zone
557
+ Database for its time zone support. The ownership of the TZ database
558
+ is explained in BCP 175: Procedure for Maintaining the Time Zone
559
+ Database section 7.
560
+
561
+ # 7. Database Ownership
562
+ #
563
+ # The TZ database itself is not an IETF Contribution or an IETF
564
+ # document. Rather it is a pre-existing and regularly updated work
565
+ # that is in the public domain, and is intended to remain in the
566
+ # public domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do
567
+ # not apply to the TZ Database or contributions that individuals make
568
+ # to it. Should any claims be made and substantiated against the TZ
569
+ # Database, the organization that is providing the IANA
570
+ # Considerations defined in this RFC, under the memorandum of
571
+ # understanding with the IETF, currently ICANN, may act in accordance
572
+ # with all competent court orders. No ownership claims will be made
573
+ # by ICANN or the IETF Trust on the database or the code. Any person
574
+ # making a contribution to the database or code waives all rights to
575
+ # future claims in that contribution or in the TZ Database.
576
+
577
+ 6. Google double-conversion
578
+
579
+ Copyright 2006-2011, the V8 project authors. All rights reserved.
580
+ Redistribution and use in source and binary forms, with or without
581
+ modification, are permitted provided that the following conditions are
582
+ met:
583
+
584
+ * Redistributions of source code must retain the above copyright
585
+ notice, this list of conditions and the following disclaimer.
586
+ * Redistributions in binary form must reproduce the above
587
+ copyright notice, this list of conditions and the following
588
+ disclaimer in the documentation and/or other materials provided
589
+ with the distribution.
590
+ * Neither the name of Google Inc. nor the names of its
591
+ contributors may be used to endorse or promote products derived
592
+ from this software without specific prior written permission.
593
+
594
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
595
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
596
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
597
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
598
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
599
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
600
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
601
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
602
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
603
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
604
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
605
+
606
+ Go standard library and runtime
607
+ Copyright 2009 The Go Authors.
608
+
609
+ Redistribution and use in source and binary forms, with or without
610
+ modification, are permitted provided that the following conditions are
611
+ met:
612
+
613
+ * Redistributions of source code must retain the above copyright
614
+ notice, this list of conditions and the following disclaimer.
615
+ * Redistributions in binary form must reproduce the above
616
+ copyright notice, this list of conditions and the following disclaimer
617
+ in the documentation and/or other materials provided with the
618
+ distribution.
619
+ * Neither the name of Google LLC nor the names of its
620
+ contributors may be used to endorse or promote products derived from
621
+ this software without specific prior written permission.
622
+
623
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
624
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
625
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
626
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
627
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
628
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
629
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
630
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
631
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
632
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
633
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
634
+
635
+
636
+ musl (Linux static runtime)
637
+ musl as a whole is licensed under the following standard MIT license:
638
+
639
+ ----------------------------------------------------------------------
640
+ Copyright © 2005-2020 Rich Felker, et al.
641
+
642
+ Permission is hereby granted, free of charge, to any person obtaining
643
+ a copy of this software and associated documentation files (the
644
+ "Software"), to deal in the Software without restriction, including
645
+ without limitation the rights to use, copy, modify, merge, publish,
646
+ distribute, sublicense, and/or sell copies of the Software, and to
647
+ permit persons to whom the Software is furnished to do so, subject to
648
+ the following conditions:
649
+
650
+ The above copyright notice and this permission notice shall be
651
+ included in all copies or substantial portions of the Software.
652
+
653
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
654
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
655
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
656
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
657
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
658
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
659
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
660
+ ----------------------------------------------------------------------
661
+
662
+ Authors/contributors include:
663
+
664
+ A. Wilcox
665
+ Ada Worcester
666
+ Alex Dowad
667
+ Alex Suykov
668
+ Alexander Monakov
669
+ Andre McCurdy
670
+ Andrew Kelley
671
+ Anthony G. Basile
672
+ Aric Belsito
673
+ Arvid Picciani
674
+ Bartosz Brachaczek
675
+ Benjamin Peterson
676
+ Bobby Bingham
677
+ Boris Brezillon
678
+ Brent Cook
679
+ Chris Spiegel
680
+ Clément Vasseur
681
+ Daniel Micay
682
+ Daniel Sabogal
683
+ Daurnimator
684
+ David Carlier
685
+ David Edelsohn
686
+ Denys Vlasenko
687
+ Dmitry Ivanov
688
+ Dmitry V. Levin
689
+ Drew DeVault
690
+ Emil Renner Berthing
691
+ Fangrui Song
692
+ Felix Fietkau
693
+ Felix Janda
694
+ Gianluca Anzolin
695
+ Hauke Mehrtens
696
+ He X
697
+ Hiltjo Posthuma
698
+ Isaac Dunham
699
+ Jaydeep Patil
700
+ Jens Gustedt
701
+ Jeremy Huntwork
702
+ Jo-Philipp Wich
703
+ Joakim Sindholt
704
+ John Spencer
705
+ Julien Ramseier
706
+ Justin Cormack
707
+ Kaarle Ritvanen
708
+ Khem Raj
709
+ Kylie McClain
710
+ Leah Neukirchen
711
+ Luca Barbato
712
+ Luka Perkov
713
+ M Farkas-Dyck (Strake)
714
+ Mahesh Bodapati
715
+ Markus Wichmann
716
+ Masanori Ogino
717
+ Michael Clark
718
+ Michael Forney
719
+ Mikhail Kremnyov
720
+ Natanael Copa
721
+ Nicholas J. Kain
722
+ orc
723
+ Pascal Cuoq
724
+ Patrick Oppenlander
725
+ Petr Hosek
726
+ Petr Skocik
727
+ Pierre Carrier
728
+ Reini Urban
729
+ Rich Felker
730
+ Richard Pennington
731
+ Ryan Fairfax
732
+ Samuel Holland
733
+ Segev Finer
734
+ Shiz
735
+ sin
736
+ Solar Designer
737
+ Stefan Kristiansson
738
+ Stefan O'Rear
739
+ Szabolcs Nagy
740
+ Timo Teräs
741
+ Trutz Behn
742
+ Valentin Ochs
743
+ Will Dietz
744
+ William Haddon
745
+ William Pitcock
746
+
747
+ Portions of this software are derived from third-party works licensed
748
+ under terms compatible with the above MIT license:
749
+
750
+ The TRE regular expression implementation (src/regex/reg* and
751
+ src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed
752
+ under a 2-clause BSD license (license text in the source files). The
753
+ included version has been heavily modified by Rich Felker in 2012, in
754
+ the interests of size, simplicity, and namespace cleanliness.
755
+
756
+ Much of the math library code (src/math/* and src/complex/*) is
757
+ Copyright © 1993,2004 Sun Microsystems or
758
+ Copyright © 2003-2011 David Schultz or
759
+ Copyright © 2003-2009 Steven G. Kargl or
760
+ Copyright © 2003-2009 Bruce D. Evans or
761
+ Copyright © 2008 Stephen L. Moshier or
762
+ Copyright © 2017-2018 Arm Limited
763
+ and labelled as such in comments in the individual source files. All
764
+ have been licensed under extremely permissive terms.
765
+
766
+ The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008
767
+ The Android Open Source Project and is licensed under a two-clause BSD
768
+ license. It was taken from Bionic libc, used on Android.
769
+
770
+ The AArch64 memcpy and memset code (src/string/aarch64/*) are
771
+ Copyright © 1999-2019, Arm Limited.
772
+
773
+ The implementation of DES for crypt (src/crypt/crypt_des.c) is
774
+ Copyright © 1994 David Burren. It is licensed under a BSD license.
775
+
776
+ The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was
777
+ originally written by Solar Designer and placed into the public
778
+ domain. The code also comes with a fallback permissive license for use
779
+ in jurisdictions that may not recognize the public domain.
780
+
781
+ The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011
782
+ Valentin Ochs and is licensed under an MIT-style license.
783
+
784
+ The x86_64 port was written by Nicholas J. Kain and is licensed under
785
+ the standard MIT terms.
786
+
787
+ The mips and microblaze ports were originally written by Richard
788
+ Pennington for use in the ellcc project. The original code was adapted
789
+ by Rich Felker for build system and code conventions during upstream
790
+ integration. It is licensed under the standard MIT terms.
791
+
792
+ The mips64 port was contributed by Imagination Technologies and is
793
+ licensed under the standard MIT terms.
794
+
795
+ The powerpc port was also originally written by Richard Pennington,
796
+ and later supplemented and integrated by John Spencer. It is licensed
797
+ under the standard MIT terms.
798
+
799
+ All other files which have no copyright comments are original works
800
+ produced specifically for use as part of this library, written either
801
+ by Rich Felker, the main author of the library, or by one or more
802
+ contibutors listed above. Details on authorship of individual files
803
+ can be found in the git version control history of the project. The
804
+ omission of copyright and license comments in each file is in the
805
+ interest of source tree size.
806
+
807
+ In addition, permission is hereby granted for all public header files
808
+ (include/* and arch/*/bits/*) and crt files intended to be linked into
809
+ applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit
810
+ the copyright notice and permission notice otherwise required by the
811
+ license, and to use these files without any requirement of
812
+ attribution. These files include substantial contributions from:
813
+
814
+ Bobby Bingham
815
+ John Spencer
816
+ Nicholas J. Kain
817
+ Rich Felker
818
+ Richard Pennington
819
+ Stefan Kristiansson
820
+ Szabolcs Nagy
821
+
822
+ all of whom have explicitly granted such permission.
823
+
824
+ This file previously contained text expressing a belief that most of
825
+ the files covered by the above exception were sufficiently trivial not
826
+ to be subject to copyright, resulting in confusion over whether it
827
+ negated the permissions granted in the license. In the spirit of
828
+ permissive licensing, and of not having licensing issues being an
829
+ obstacle to adoption, that text has been removed.
830
+
831
+
832
+ mingw-w64 (Windows runtime)
833
+ With exception of certain parts that are prominently marked as being
834
+ in the Public Domain, BSD, or LGPL this Software is provided under the
835
+ Zope Public License (ZPL) Version 2.1.
836
+
837
+ Copyright (c) 2009 - 2013 by the mingw-w64 project
838
+
839
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
840
+
841
+ This license has been certified as open source. It has also been designated
842
+ as GPL compatible by the Free Software Foundation (FSF).
843
+
844
+ Redistribution and use in source and binary forms, with or without
845
+ modification, are permitted provided that the following conditions are met:
846
+
847
+ 1. Redistributions in source code must retain the accompanying copyright
848
+ notice, this list of conditions, and the following disclaimer.
849
+ 2. Redistributions in binary form must reproduce the accompanying
850
+ copyright notice, this list of conditions, and the following disclaimer
851
+ in the documentation and/or other materials provided with the
852
+ distribution.
853
+ 3. Names of the copyright holders must not be used to endorse or promote
854
+ products derived from this software without prior written permission
855
+ from the copyright holders.
856
+ 4. The right to distribute this software or to use it for any purpose does
857
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
858
+ the copyright holders. Use of them is covered by separate agreement
859
+ with the copyright holders.
860
+ 5. If any files are modified, you must cause the modified files to carry
861
+ prominent notices stating that you changed the files and the date of
862
+ any change.
863
+
864
+ Disclaimer
865
+
866
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
867
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
868
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
869
+ EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
870
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
871
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
872
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
873
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
874
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
875
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
876
+
877
+
878
+ Zig compiler runtime
879
+ The MIT License (Expat)
880
+
881
+ Copyright (c) Zig contributors
882
+
883
+ Permission is hereby granted, free of charge, to any person obtaining a copy
884
+ of this software and associated documentation files (the "Software"), to deal
885
+ in the Software without restriction, including without limitation the rights
886
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
887
+ copies of the Software, and to permit persons to whom the Software is
888
+ furnished to do so, subject to the following conditions:
889
+
890
+ The above copyright notice and this permission notice shall be included in
891
+ all copies or substantial portions of the Software.
892
+
893
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
894
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
895
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
896
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
897
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
898
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
899
+ THE SOFTWARE.
900
+
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.3",
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
+ }