0xkobold 0.7.2 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/HEARTBEAT.md +239 -0
  2. package/IDENTITY.md +12 -0
  3. package/README.md +138 -4
  4. package/SOUL.md +21 -0
  5. package/dist/package.json +10 -5
  6. package/dist/src/agent/bootstrap-loader.js +295 -66
  7. package/dist/src/agent/bootstrap-loader.js.map +1 -1
  8. package/dist/src/agent/context-pruning.js +10 -5
  9. package/dist/src/agent/context-pruning.js.map +1 -1
  10. package/dist/src/agent/embedded-runner.js +29 -15
  11. package/dist/src/agent/embedded-runner.js.map +1 -1
  12. package/dist/src/agent/index.js +5 -2
  13. package/dist/src/agent/index.js.map +1 -1
  14. package/dist/src/agent/system-prompt.js +167 -20
  15. package/dist/src/agent/system-prompt.js.map +1 -1
  16. package/dist/src/agent/tools/spawn-agent.js +72 -5
  17. package/dist/src/agent/tools/spawn-agent.js.map +1 -1
  18. package/dist/src/channels/slack/webhook.js +2 -2
  19. package/dist/src/channels/slack/webhook.js.map +1 -1
  20. package/dist/src/channels/telegram/bot.js +4 -4
  21. package/dist/src/channels/telegram/bot.js.map +1 -1
  22. package/dist/src/channels/whatsapp/integration.js +4 -4
  23. package/dist/src/channels/whatsapp/integration.js.map +1 -1
  24. package/dist/src/cli/commands/gateway.js +9 -10
  25. package/dist/src/cli/commands/gateway.js.map +1 -1
  26. package/dist/src/cli/commands/init.js +90 -0
  27. package/dist/src/cli/commands/init.js.map +1 -1
  28. package/dist/src/cli/commands/setup.js +53 -0
  29. package/dist/src/cli/commands/setup.js.map +1 -1
  30. package/dist/src/cli/index.js +0 -0
  31. package/dist/src/config/unified-config.js +5 -0
  32. package/dist/src/config/unified-config.js.map +1 -1
  33. package/dist/src/cron/index.js +2 -0
  34. package/dist/src/cron/index.js.map +1 -1
  35. package/dist/src/cron/nl-parser.js +522 -0
  36. package/dist/src/cron/nl-parser.js.map +1 -0
  37. package/dist/src/cron/runner.js +6 -31
  38. package/dist/src/cron/runner.js.map +1 -1
  39. package/dist/src/event-bus/index.js.map +1 -1
  40. package/dist/src/extensions/core/agent-orchestrator-extension.js +200 -148
  41. package/dist/src/extensions/core/agent-orchestrator-extension.js.map +1 -1
  42. package/dist/src/extensions/core/diagnostics-extension.js +93 -56
  43. package/dist/src/extensions/core/diagnostics-extension.js.map +1 -1
  44. package/dist/src/extensions/core/draconic-safety-extension.js +256 -3
  45. package/dist/src/extensions/core/draconic-safety-extension.js.map +1 -1
  46. package/dist/src/extensions/core/heartbeat-extension.js +416 -150
  47. package/dist/src/extensions/core/heartbeat-extension.js.map +1 -1
  48. package/dist/src/extensions/core/{generative-agents-extension.js → learning-extension.js} +90 -128
  49. package/dist/src/extensions/core/learning-extension.js.map +1 -0
  50. package/dist/src/extensions/core/perennial-memory-extension.js +884 -87
  51. package/dist/src/extensions/core/perennial-memory-extension.js.map +1 -1
  52. package/dist/src/extensions/core/routed-ollama-extension.js +345 -0
  53. package/dist/src/extensions/core/routed-ollama-extension.js.map +1 -0
  54. package/dist/src/extensions/core/task-manager-extension.js +25 -2
  55. package/dist/src/extensions/core/task-manager-extension.js.map +1 -1
  56. package/dist/src/extensions/core/websearch-enhanced-extension.js +81 -23
  57. package/dist/src/extensions/core/websearch-enhanced-extension.js.map +1 -1
  58. package/dist/src/extensions/core/workspace-footer-extension.js +40 -63
  59. package/dist/src/extensions/core/workspace-footer-extension.js.map +1 -1
  60. package/dist/src/extensions/loader.js +5 -1
  61. package/dist/src/extensions/loader.js.map +1 -1
  62. package/dist/src/gateway/gateway-server.js +74 -3
  63. package/dist/src/gateway/gateway-server.js.map +1 -1
  64. package/dist/src/gateway/index.js +2 -2
  65. package/dist/src/gateway/index.js.map +1 -1
  66. package/dist/src/gateway/methods/agent.js +1 -1
  67. package/dist/src/gateway/methods/agent.js.map +1 -1
  68. package/dist/src/gateway/methods/index.js +4 -0
  69. package/dist/src/gateway/methods/index.js.map +1 -1
  70. package/dist/src/gateway/methods/node.js +261 -0
  71. package/dist/src/gateway/methods/node.js.map +1 -0
  72. package/dist/src/gateway/queue-modes.js +356 -0
  73. package/dist/src/gateway/queue-modes.js.map +1 -0
  74. package/dist/src/index.js +47 -6
  75. package/dist/src/index.js.map +1 -1
  76. package/dist/src/llm/community-analytics.js +569 -0
  77. package/dist/src/llm/community-analytics.js.map +1 -0
  78. package/dist/src/llm/index.js +28 -4
  79. package/dist/src/llm/index.js.map +1 -1
  80. package/dist/src/llm/model-discovery.js +335 -0
  81. package/dist/src/llm/model-discovery.js.map +1 -0
  82. package/dist/src/llm/model-popularity.js +566 -0
  83. package/dist/src/llm/model-popularity.js.map +1 -0
  84. package/dist/src/llm/model-scoring-db.js +553 -0
  85. package/dist/src/llm/model-scoring-db.js.map +1 -0
  86. package/dist/src/llm/multi-provider.js +258 -0
  87. package/dist/src/llm/multi-provider.js.map +1 -0
  88. package/dist/src/llm/ollama.js +133 -187
  89. package/dist/src/llm/ollama.js.map +1 -1
  90. package/dist/src/llm/router-commands.js +773 -0
  91. package/dist/src/llm/router-commands.js.map +1 -0
  92. package/dist/src/llm/router-core.js +600 -0
  93. package/dist/src/llm/router-core.js.map +1 -0
  94. package/dist/src/memory/checkpoint-manager.js +278 -0
  95. package/dist/src/memory/checkpoint-manager.js.map +1 -0
  96. package/dist/src/memory/conflict-detector.js +279 -0
  97. package/dist/src/memory/conflict-detector.js.map +1 -0
  98. package/dist/src/memory/context-graph.js +360 -0
  99. package/dist/src/memory/context-graph.js.map +1 -0
  100. package/dist/src/memory/dialectic/benchmark-cli.js +200 -0
  101. package/dist/src/memory/dialectic/benchmark-cli.js.map +1 -0
  102. package/dist/src/memory/dialectic/debug-reasoning.js +37 -0
  103. package/dist/src/memory/dialectic/debug-reasoning.js.map +1 -0
  104. package/dist/src/memory/dialectic/index.js +135 -0
  105. package/dist/src/memory/dialectic/index.js.map +1 -0
  106. package/dist/src/memory/dialectic/nudges.js +380 -0
  107. package/dist/src/memory/dialectic/nudges.js.map +1 -0
  108. package/dist/src/memory/dialectic/reasoning-engine.js +607 -0
  109. package/dist/src/memory/dialectic/reasoning-engine.js.map +1 -0
  110. package/dist/src/memory/dialectic/reasoning.js +390 -0
  111. package/dist/src/memory/dialectic/reasoning.js.map +1 -0
  112. package/dist/src/memory/dialectic/skill-creation.js +481 -0
  113. package/dist/src/memory/dialectic/skill-creation.js.map +1 -0
  114. package/dist/src/memory/dialectic/store.js +663 -0
  115. package/dist/src/memory/dialectic/store.js.map +1 -0
  116. package/dist/src/memory/dialectic/types.js +11 -0
  117. package/dist/src/memory/dialectic/types.js.map +1 -0
  118. package/dist/src/memory/index.js +24 -2
  119. package/dist/src/memory/index.js.map +1 -1
  120. package/dist/src/memory/memory-decay.js +350 -0
  121. package/dist/src/memory/memory-decay.js.map +1 -0
  122. package/dist/src/memory/memory-integration.js +5 -5
  123. package/dist/src/memory/memory-integration.js.map +1 -1
  124. package/dist/src/memory/migrate-memory-stream.js +97 -0
  125. package/dist/src/memory/migrate-memory-stream.js.map +1 -0
  126. package/dist/src/memory/session-memory-bridge.js +49 -5
  127. package/dist/src/memory/session-memory-bridge.js.map +1 -1
  128. package/dist/src/memory/session-store.js +123 -0
  129. package/dist/src/memory/session-store.js.map +1 -1
  130. package/dist/src/memory/smart-write-rules.js +164 -0
  131. package/dist/src/memory/smart-write-rules.js.map +1 -0
  132. package/dist/src/memory/tiered-memory.js +436 -0
  133. package/dist/src/memory/tiered-memory.js.map +1 -0
  134. package/dist/src/memory/types.js +6 -0
  135. package/dist/src/memory/types.js.map +1 -0
  136. package/dist/src/memory/verify-migration.js +99 -0
  137. package/dist/src/memory/verify-migration.js.map +1 -0
  138. package/dist/src/pi-config.js +11 -9
  139. package/dist/src/pi-config.js.map +1 -1
  140. package/dist/src/skills/conditional-skills.js +464 -0
  141. package/dist/src/skills/conditional-skills.js.map +1 -0
  142. package/dist/src/skills/index.js +5 -0
  143. package/dist/src/skills/index.js.map +1 -1
  144. package/dist/src/skills/loader.js +56 -0
  145. package/dist/src/skills/loader.js.map +1 -1
  146. package/dist/src/skills/skill-manage.js +417 -0
  147. package/dist/src/skills/skill-manage.js.map +1 -0
  148. package/dist/src/tui/commands/orchestration-commands.js +62 -0
  149. package/dist/src/tui/commands/orchestration-commands.js.map +1 -1
  150. package/package.json +10 -5
  151. package/skills/model-router-test.ts +65 -0
  152. package/dist/src/extensions/core/auto-security-scan-extension.js +0 -41
  153. package/dist/src/extensions/core/auto-security-scan-extension.js.map +0 -1
  154. package/dist/src/extensions/core/cloudflare-browser-extension.js +0 -389
  155. package/dist/src/extensions/core/cloudflare-browser-extension.js.map +0 -1
  156. package/dist/src/extensions/core/compaction-safeguard.js +0 -223
  157. package/dist/src/extensions/core/compaction-safeguard.js.map +0 -1
  158. package/dist/src/extensions/core/generative-agents-extension.js.map +0 -1
  159. package/dist/src/extensions/core/obsidian-bridge-extension.js +0 -488
  160. package/dist/src/extensions/core/obsidian-bridge-extension.js.map +0 -1
  161. package/dist/src/llm/router.js +0 -145
  162. package/dist/src/llm/router.js.map +0 -1
  163. package/skills/kobold-scan-skill/node_modules/.package-lock.json +0 -172
  164. package/skills/kobold-scan-skill/node_modules/ansi-styles/index.d.ts +0 -345
  165. package/skills/kobold-scan-skill/node_modules/ansi-styles/index.js +0 -163
  166. package/skills/kobold-scan-skill/node_modules/ansi-styles/license +0 -9
  167. package/skills/kobold-scan-skill/node_modules/ansi-styles/package.json +0 -56
  168. package/skills/kobold-scan-skill/node_modules/ansi-styles/readme.md +0 -152
  169. package/skills/kobold-scan-skill/node_modules/balanced-match/.github/FUNDING.yml +0 -2
  170. package/skills/kobold-scan-skill/node_modules/balanced-match/LICENSE.md +0 -21
  171. package/skills/kobold-scan-skill/node_modules/balanced-match/README.md +0 -97
  172. package/skills/kobold-scan-skill/node_modules/balanced-match/index.js +0 -62
  173. package/skills/kobold-scan-skill/node_modules/balanced-match/package.json +0 -48
  174. package/skills/kobold-scan-skill/node_modules/brace-expansion/.github/FUNDING.yml +0 -2
  175. package/skills/kobold-scan-skill/node_modules/brace-expansion/LICENSE +0 -21
  176. package/skills/kobold-scan-skill/node_modules/brace-expansion/README.md +0 -135
  177. package/skills/kobold-scan-skill/node_modules/brace-expansion/index.js +0 -203
  178. package/skills/kobold-scan-skill/node_modules/brace-expansion/package.json +0 -49
  179. package/skills/kobold-scan-skill/node_modules/chalk/index.d.ts +0 -415
  180. package/skills/kobold-scan-skill/node_modules/chalk/license +0 -9
  181. package/skills/kobold-scan-skill/node_modules/chalk/package.json +0 -68
  182. package/skills/kobold-scan-skill/node_modules/chalk/readme.md +0 -341
  183. package/skills/kobold-scan-skill/node_modules/chalk/source/index.js +0 -229
  184. package/skills/kobold-scan-skill/node_modules/chalk/source/templates.js +0 -134
  185. package/skills/kobold-scan-skill/node_modules/chalk/source/util.js +0 -39
  186. package/skills/kobold-scan-skill/node_modules/color-convert/CHANGELOG.md +0 -54
  187. package/skills/kobold-scan-skill/node_modules/color-convert/LICENSE +0 -21
  188. package/skills/kobold-scan-skill/node_modules/color-convert/README.md +0 -68
  189. package/skills/kobold-scan-skill/node_modules/color-convert/conversions.js +0 -839
  190. package/skills/kobold-scan-skill/node_modules/color-convert/index.js +0 -81
  191. package/skills/kobold-scan-skill/node_modules/color-convert/package.json +0 -48
  192. package/skills/kobold-scan-skill/node_modules/color-convert/route.js +0 -97
  193. package/skills/kobold-scan-skill/node_modules/color-name/LICENSE +0 -8
  194. package/skills/kobold-scan-skill/node_modules/color-name/README.md +0 -11
  195. package/skills/kobold-scan-skill/node_modules/color-name/index.js +0 -152
  196. package/skills/kobold-scan-skill/node_modules/color-name/package.json +0 -28
  197. package/skills/kobold-scan-skill/node_modules/commander/LICENSE +0 -22
  198. package/skills/kobold-scan-skill/node_modules/commander/Readme.md +0 -1129
  199. package/skills/kobold-scan-skill/node_modules/commander/esm.mjs +0 -16
  200. package/skills/kobold-scan-skill/node_modules/commander/index.js +0 -27
  201. package/skills/kobold-scan-skill/node_modules/commander/lib/argument.js +0 -147
  202. package/skills/kobold-scan-skill/node_modules/commander/lib/command.js +0 -2179
  203. package/skills/kobold-scan-skill/node_modules/commander/lib/error.js +0 -45
  204. package/skills/kobold-scan-skill/node_modules/commander/lib/help.js +0 -461
  205. package/skills/kobold-scan-skill/node_modules/commander/lib/option.js +0 -326
  206. package/skills/kobold-scan-skill/node_modules/commander/lib/suggestSimilar.js +0 -100
  207. package/skills/kobold-scan-skill/node_modules/commander/package-support.json +0 -16
  208. package/skills/kobold-scan-skill/node_modules/commander/package.json +0 -80
  209. package/skills/kobold-scan-skill/node_modules/commander/typings/index.d.ts +0 -891
  210. package/skills/kobold-scan-skill/node_modules/fs.realpath/LICENSE +0 -43
  211. package/skills/kobold-scan-skill/node_modules/fs.realpath/README.md +0 -33
  212. package/skills/kobold-scan-skill/node_modules/fs.realpath/index.js +0 -66
  213. package/skills/kobold-scan-skill/node_modules/fs.realpath/old.js +0 -303
  214. package/skills/kobold-scan-skill/node_modules/fs.realpath/package.json +0 -26
  215. package/skills/kobold-scan-skill/node_modules/glob/LICENSE +0 -15
  216. package/skills/kobold-scan-skill/node_modules/glob/README.md +0 -399
  217. package/skills/kobold-scan-skill/node_modules/glob/common.js +0 -244
  218. package/skills/kobold-scan-skill/node_modules/glob/glob.js +0 -790
  219. package/skills/kobold-scan-skill/node_modules/glob/package.json +0 -55
  220. package/skills/kobold-scan-skill/node_modules/glob/sync.js +0 -486
  221. package/skills/kobold-scan-skill/node_modules/has-flag/index.d.ts +0 -39
  222. package/skills/kobold-scan-skill/node_modules/has-flag/index.js +0 -8
  223. package/skills/kobold-scan-skill/node_modules/has-flag/license +0 -9
  224. package/skills/kobold-scan-skill/node_modules/has-flag/package.json +0 -46
  225. package/skills/kobold-scan-skill/node_modules/has-flag/readme.md +0 -89
  226. package/skills/kobold-scan-skill/node_modules/inflight/LICENSE +0 -15
  227. package/skills/kobold-scan-skill/node_modules/inflight/README.md +0 -37
  228. package/skills/kobold-scan-skill/node_modules/inflight/inflight.js +0 -54
  229. package/skills/kobold-scan-skill/node_modules/inflight/package.json +0 -29
  230. package/skills/kobold-scan-skill/node_modules/inherits/LICENSE +0 -16
  231. package/skills/kobold-scan-skill/node_modules/inherits/README.md +0 -42
  232. package/skills/kobold-scan-skill/node_modules/inherits/inherits.js +0 -9
  233. package/skills/kobold-scan-skill/node_modules/inherits/inherits_browser.js +0 -27
  234. package/skills/kobold-scan-skill/node_modules/inherits/package.json +0 -29
  235. package/skills/kobold-scan-skill/node_modules/minimatch/LICENSE +0 -15
  236. package/skills/kobold-scan-skill/node_modules/minimatch/README.md +0 -259
  237. package/skills/kobold-scan-skill/node_modules/minimatch/lib/path.js +0 -4
  238. package/skills/kobold-scan-skill/node_modules/minimatch/minimatch.js +0 -944
  239. package/skills/kobold-scan-skill/node_modules/minimatch/package.json +0 -35
  240. package/skills/kobold-scan-skill/node_modules/once/LICENSE +0 -15
  241. package/skills/kobold-scan-skill/node_modules/once/README.md +0 -79
  242. package/skills/kobold-scan-skill/node_modules/once/once.js +0 -42
  243. package/skills/kobold-scan-skill/node_modules/once/package.json +0 -33
  244. package/skills/kobold-scan-skill/node_modules/supports-color/browser.js +0 -5
  245. package/skills/kobold-scan-skill/node_modules/supports-color/index.js +0 -135
  246. package/skills/kobold-scan-skill/node_modules/supports-color/license +0 -9
  247. package/skills/kobold-scan-skill/node_modules/supports-color/package.json +0 -53
  248. package/skills/kobold-scan-skill/node_modules/supports-color/readme.md +0 -76
  249. package/skills/kobold-scan-skill/node_modules/wrappy/LICENSE +0 -15
  250. package/skills/kobold-scan-skill/node_modules/wrappy/README.md +0 -36
  251. package/skills/kobold-scan-skill/node_modules/wrappy/package.json +0 -29
  252. package/skills/kobold-scan-skill/node_modules/wrappy/wrappy.js +0 -33
@@ -1,89 +0,0 @@
1
- # has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag)
2
-
3
- > Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag
4
-
5
- Correctly stops looking after an `--` argument terminator.
6
-
7
- ---
8
-
9
- <div align="center">
10
- <b>
11
- <a href="https://tidelift.com/subscription/pkg/npm-has-flag?utm_source=npm-has-flag&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
12
- </b>
13
- <br>
14
- <sub>
15
- Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
16
- </sub>
17
- </div>
18
-
19
- ---
20
-
21
-
22
- ## Install
23
-
24
- ```
25
- $ npm install has-flag
26
- ```
27
-
28
-
29
- ## Usage
30
-
31
- ```js
32
- // foo.js
33
- const hasFlag = require('has-flag');
34
-
35
- hasFlag('unicorn');
36
- //=> true
37
-
38
- hasFlag('--unicorn');
39
- //=> true
40
-
41
- hasFlag('f');
42
- //=> true
43
-
44
- hasFlag('-f');
45
- //=> true
46
-
47
- hasFlag('foo=bar');
48
- //=> true
49
-
50
- hasFlag('foo');
51
- //=> false
52
-
53
- hasFlag('rainbow');
54
- //=> false
55
- ```
56
-
57
- ```
58
- $ node foo.js -f --unicorn --foo=bar -- --rainbow
59
- ```
60
-
61
-
62
- ## API
63
-
64
- ### hasFlag(flag, [argv])
65
-
66
- Returns a boolean for whether the flag exists.
67
-
68
- #### flag
69
-
70
- Type: `string`
71
-
72
- CLI flag to look for. The `--` prefix is optional.
73
-
74
- #### argv
75
-
76
- Type: `string[]`<br>
77
- Default: `process.argv`
78
-
79
- CLI arguments.
80
-
81
-
82
- ## Security
83
-
84
- To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
85
-
86
-
87
- ## License
88
-
89
- MIT © [Sindre Sorhus](https://sindresorhus.com)
@@ -1,15 +0,0 @@
1
- The ISC License
2
-
3
- Copyright (c) Isaac Z. Schlueter
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -1,37 +0,0 @@
1
- # inflight
2
-
3
- Add callbacks to requests in flight to avoid async duplication
4
-
5
- ## USAGE
6
-
7
- ```javascript
8
- var inflight = require('inflight')
9
-
10
- // some request that does some stuff
11
- function req(key, callback) {
12
- // key is any random string. like a url or filename or whatever.
13
- //
14
- // will return either a falsey value, indicating that the
15
- // request for this key is already in flight, or a new callback
16
- // which when called will call all callbacks passed to inflightk
17
- // with the same key
18
- callback = inflight(key, callback)
19
-
20
- // If we got a falsey value back, then there's already a req going
21
- if (!callback) return
22
-
23
- // this is where you'd fetch the url or whatever
24
- // callback is also once()-ified, so it can safely be assigned
25
- // to multiple events etc. First call wins.
26
- setTimeout(function() {
27
- callback(null, key)
28
- }, 100)
29
- }
30
-
31
- // only assigns a single setTimeout
32
- // when it dings, all cbs get called
33
- req('foo', cb1)
34
- req('foo', cb2)
35
- req('foo', cb3)
36
- req('foo', cb4)
37
- ```
@@ -1,54 +0,0 @@
1
- var wrappy = require('wrappy')
2
- var reqs = Object.create(null)
3
- var once = require('once')
4
-
5
- module.exports = wrappy(inflight)
6
-
7
- function inflight (key, cb) {
8
- if (reqs[key]) {
9
- reqs[key].push(cb)
10
- return null
11
- } else {
12
- reqs[key] = [cb]
13
- return makeres(key)
14
- }
15
- }
16
-
17
- function makeres (key) {
18
- return once(function RES () {
19
- var cbs = reqs[key]
20
- var len = cbs.length
21
- var args = slice(arguments)
22
-
23
- // XXX It's somewhat ambiguous whether a new callback added in this
24
- // pass should be queued for later execution if something in the
25
- // list of callbacks throws, or if it should just be discarded.
26
- // However, it's such an edge case that it hardly matters, and either
27
- // choice is likely as surprising as the other.
28
- // As it happens, we do go ahead and schedule it for later execution.
29
- try {
30
- for (var i = 0; i < len; i++) {
31
- cbs[i].apply(null, args)
32
- }
33
- } finally {
34
- if (cbs.length > len) {
35
- // added more in the interim.
36
- // de-zalgo, just in case, but don't call again.
37
- cbs.splice(0, len)
38
- process.nextTick(function () {
39
- RES.apply(null, args)
40
- })
41
- } else {
42
- delete reqs[key]
43
- }
44
- }
45
- })
46
- }
47
-
48
- function slice (args) {
49
- var length = args.length
50
- var array = []
51
-
52
- for (var i = 0; i < length; i++) array[i] = args[i]
53
- return array
54
- }
@@ -1,29 +0,0 @@
1
- {
2
- "name": "inflight",
3
- "version": "1.0.6",
4
- "description": "Add callbacks to requests in flight to avoid async duplication",
5
- "main": "inflight.js",
6
- "files": [
7
- "inflight.js"
8
- ],
9
- "dependencies": {
10
- "once": "^1.3.0",
11
- "wrappy": "1"
12
- },
13
- "devDependencies": {
14
- "tap": "^7.1.2"
15
- },
16
- "scripts": {
17
- "test": "tap test.js --100"
18
- },
19
- "repository": {
20
- "type": "git",
21
- "url": "https://github.com/npm/inflight.git"
22
- },
23
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
24
- "bugs": {
25
- "url": "https://github.com/isaacs/inflight/issues"
26
- },
27
- "homepage": "https://github.com/isaacs/inflight",
28
- "license": "ISC"
29
- }
@@ -1,16 +0,0 @@
1
- The ISC License
2
-
3
- Copyright (c) Isaac Z. Schlueter
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
11
- FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
- PERFORMANCE OF THIS SOFTWARE.
16
-
@@ -1,42 +0,0 @@
1
- Browser-friendly inheritance fully compatible with standard node.js
2
- [inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
3
-
4
- This package exports standard `inherits` from node.js `util` module in
5
- node environment, but also provides alternative browser-friendly
6
- implementation through [browser
7
- field](https://gist.github.com/shtylman/4339901). Alternative
8
- implementation is a literal copy of standard one located in standalone
9
- module to avoid requiring of `util`. It also has a shim for old
10
- browsers with no `Object.create` support.
11
-
12
- While keeping you sure you are using standard `inherits`
13
- implementation in node.js environment, it allows bundlers such as
14
- [browserify](https://github.com/substack/node-browserify) to not
15
- include full `util` package to your client code if all you need is
16
- just `inherits` function. It worth, because browser shim for `util`
17
- package is large and `inherits` is often the single function you need
18
- from it.
19
-
20
- It's recommended to use this package instead of
21
- `require('util').inherits` for any code that has chances to be used
22
- not only in node.js but in browser too.
23
-
24
- ## usage
25
-
26
- ```js
27
- var inherits = require('inherits');
28
- // then use exactly as the standard one
29
- ```
30
-
31
- ## note on version ~1.0
32
-
33
- Version ~1.0 had completely different motivation and is not compatible
34
- neither with 2.0 nor with standard node.js `inherits`.
35
-
36
- If you are using version ~1.0 and planning to switch to ~2.0, be
37
- careful:
38
-
39
- * new version uses `super_` instead of `super` for referencing
40
- superclass
41
- * new version overwrites current prototype while old one preserves any
42
- existing fields on it
@@ -1,9 +0,0 @@
1
- try {
2
- var util = require('util');
3
- /* istanbul ignore next */
4
- if (typeof util.inherits !== 'function') throw '';
5
- module.exports = util.inherits;
6
- } catch (e) {
7
- /* istanbul ignore next */
8
- module.exports = require('./inherits_browser.js');
9
- }
@@ -1,27 +0,0 @@
1
- if (typeof Object.create === 'function') {
2
- // implementation from standard node.js 'util' module
3
- module.exports = function inherits(ctor, superCtor) {
4
- if (superCtor) {
5
- ctor.super_ = superCtor
6
- ctor.prototype = Object.create(superCtor.prototype, {
7
- constructor: {
8
- value: ctor,
9
- enumerable: false,
10
- writable: true,
11
- configurable: true
12
- }
13
- })
14
- }
15
- };
16
- } else {
17
- // old school shim for old browsers
18
- module.exports = function inherits(ctor, superCtor) {
19
- if (superCtor) {
20
- ctor.super_ = superCtor
21
- var TempCtor = function () {}
22
- TempCtor.prototype = superCtor.prototype
23
- ctor.prototype = new TempCtor()
24
- ctor.prototype.constructor = ctor
25
- }
26
- }
27
- }
@@ -1,29 +0,0 @@
1
- {
2
- "name": "inherits",
3
- "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
4
- "version": "2.0.4",
5
- "keywords": [
6
- "inheritance",
7
- "class",
8
- "klass",
9
- "oop",
10
- "object-oriented",
11
- "inherits",
12
- "browser",
13
- "browserify"
14
- ],
15
- "main": "./inherits.js",
16
- "browser": "./inherits_browser.js",
17
- "repository": "git://github.com/isaacs/inherits",
18
- "license": "ISC",
19
- "scripts": {
20
- "test": "tap"
21
- },
22
- "devDependencies": {
23
- "tap": "^14.2.4"
24
- },
25
- "files": [
26
- "inherits.js",
27
- "inherits_browser.js"
28
- ]
29
- }
@@ -1,15 +0,0 @@
1
- The ISC License
2
-
3
- Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -1,259 +0,0 @@
1
- # minimatch
2
-
3
- A minimal matching utility.
4
-
5
- [![Build Status](https://travis-ci.org/isaacs/minimatch.svg?branch=master)](http://travis-ci.org/isaacs/minimatch)
6
-
7
-
8
- This is the matching library used internally by npm.
9
-
10
- It works by converting glob expressions into JavaScript `RegExp`
11
- objects.
12
-
13
- ## Usage
14
-
15
- ```javascript
16
- var minimatch = require("minimatch")
17
-
18
- minimatch("bar.foo", "*.foo") // true!
19
- minimatch("bar.foo", "*.bar") // false!
20
- minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
21
- ```
22
-
23
- ## Features
24
-
25
- Supports these glob features:
26
-
27
- * Brace Expansion
28
- * Extended glob matching
29
- * "Globstar" `**` matching
30
-
31
- See:
32
-
33
- * `man sh`
34
- * `man bash`
35
- * `man 3 fnmatch`
36
- * `man 5 gitignore`
37
-
38
- ## Windows
39
-
40
- **Please only use forward-slashes in glob expressions.**
41
-
42
- Though windows uses either `/` or `\` as its path separator, only `/`
43
- characters are used by this glob implementation. You must use
44
- forward-slashes **only** in glob expressions. Back-slashes in patterns
45
- will always be interpreted as escape characters, not path separators.
46
-
47
- Note that `\` or `/` _will_ be interpreted as path separators in paths on
48
- Windows, and will match against `/` in glob expressions.
49
-
50
- So just always use `/` in patterns.
51
-
52
- ## Minimatch Class
53
-
54
- Create a minimatch object by instantiating the `minimatch.Minimatch` class.
55
-
56
- ```javascript
57
- var Minimatch = require("minimatch").Minimatch
58
- var mm = new Minimatch(pattern, options)
59
- ```
60
-
61
- ### Properties
62
-
63
- * `pattern` The original pattern the minimatch object represents.
64
- * `options` The options supplied to the constructor.
65
- * `set` A 2-dimensional array of regexp or string expressions.
66
- Each row in the
67
- array corresponds to a brace-expanded pattern. Each item in the row
68
- corresponds to a single path-part. For example, the pattern
69
- `{a,b/c}/d` would expand to a set of patterns like:
70
-
71
- [ [ a, d ]
72
- , [ b, c, d ] ]
73
-
74
- If a portion of the pattern doesn't have any "magic" in it
75
- (that is, it's something like `"foo"` rather than `fo*o?`), then it
76
- will be left as a string rather than converted to a regular
77
- expression.
78
-
79
- * `regexp` Created by the `makeRe` method. A single regular expression
80
- expressing the entire pattern. This is useful in cases where you wish
81
- to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
82
- * `negate` True if the pattern is negated.
83
- * `comment` True if the pattern is a comment.
84
- * `empty` True if the pattern is `""`.
85
-
86
- ### Methods
87
-
88
- * `makeRe` Generate the `regexp` member if necessary, and return it.
89
- Will return `false` if the pattern is invalid.
90
- * `match(fname)` Return true if the filename matches the pattern, or
91
- false otherwise.
92
- * `matchOne(fileArray, patternArray, partial)` Take a `/`-split
93
- filename, and match it against a single row in the `regExpSet`. This
94
- method is mainly for internal use, but is exposed so that it can be
95
- used by a glob-walker that needs to avoid excessive filesystem calls.
96
-
97
- All other methods are internal, and will be called as necessary.
98
-
99
- ### minimatch(path, pattern, options)
100
-
101
- Main export. Tests a path against the pattern using the options.
102
-
103
- ```javascript
104
- var isJS = minimatch(file, "*.js", { matchBase: true })
105
- ```
106
-
107
- ### minimatch.filter(pattern, options)
108
-
109
- Returns a function that tests its
110
- supplied argument, suitable for use with `Array.filter`. Example:
111
-
112
- ```javascript
113
- var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
114
- ```
115
-
116
- ### minimatch.match(list, pattern, options)
117
-
118
- Match against the list of
119
- files, in the style of fnmatch or glob. If nothing is matched, and
120
- options.nonull is set, then return a list containing the pattern itself.
121
-
122
- ```javascript
123
- var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})
124
- ```
125
-
126
- ### minimatch.makeRe(pattern, options)
127
-
128
- Make a regular expression object from the pattern.
129
-
130
- ## Options
131
-
132
- All options are `false` by default.
133
-
134
- ### debug
135
-
136
- Dump a ton of stuff to stderr.
137
-
138
- ### nobrace
139
-
140
- Do not expand `{a,b}` and `{1..3}` brace sets.
141
-
142
- ### noglobstar
143
-
144
- Disable `**` matching against multiple folder names.
145
-
146
- ### dot
147
-
148
- Allow patterns to match filenames starting with a period, even if
149
- the pattern does not explicitly have a period in that spot.
150
-
151
- Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
152
- is set.
153
-
154
- ### noext
155
-
156
- Disable "extglob" style patterns like `+(a|b)`.
157
-
158
- ### nocase
159
-
160
- Perform a case-insensitive match.
161
-
162
- ### nonull
163
-
164
- When a match is not found by `minimatch.match`, return a list containing
165
- the pattern itself if this option is set. When not set, an empty list
166
- is returned if there are no matches.
167
-
168
- ### matchBase
169
-
170
- If set, then patterns without slashes will be matched
171
- against the basename of the path if it contains slashes. For example,
172
- `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
173
-
174
- ### nocomment
175
-
176
- Suppress the behavior of treating `#` at the start of a pattern as a
177
- comment.
178
-
179
- ### nonegate
180
-
181
- Suppress the behavior of treating a leading `!` character as negation.
182
-
183
- ### flipNegate
184
-
185
- Returns from negate expressions the same as if they were not negated.
186
- (Ie, true on a hit, false on a miss.)
187
-
188
- ### partial
189
-
190
- Compare a partial path to a pattern. As long as the parts of the path that
191
- are present are not contradicted by the pattern, it will be treated as a
192
- match. This is useful in applications where you're walking through a
193
- folder structure, and don't yet have the full path, but want to ensure that
194
- you do not walk down paths that can never be a match.
195
-
196
- For example,
197
-
198
- ```js
199
- minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d
200
- minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d
201
- minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a
202
- ```
203
-
204
- ### windowsPathsNoEscape
205
-
206
- Use `\\` as a path separator _only_, and _never_ as an escape
207
- character. If set, all `\\` characters are replaced with `/` in
208
- the pattern. Note that this makes it **impossible** to match
209
- against paths containing literal glob pattern characters, but
210
- allows matching with patterns constructed using `path.join()` and
211
- `path.resolve()` on Windows platforms, mimicking the (buggy!)
212
- behavior of earlier versions on Windows. Please use with
213
- caution, and be mindful of [the caveat about Windows
214
- paths](#windows).
215
-
216
- For legacy reasons, this is also set if
217
- `options.allowWindowsEscape` is set to the exact value `false`.
218
-
219
- ## Comparisons to other fnmatch/glob implementations
220
-
221
- While strict compliance with the existing standards is a worthwhile
222
- goal, some discrepancies exist between minimatch and other
223
- implementations, and are intentional.
224
-
225
- If the pattern starts with a `!` character, then it is negated. Set the
226
- `nonegate` flag to suppress this behavior, and treat leading `!`
227
- characters normally. This is perhaps relevant if you wish to start the
228
- pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
229
- characters at the start of a pattern will negate the pattern multiple
230
- times.
231
-
232
- If a pattern starts with `#`, then it is treated as a comment, and
233
- will not match anything. Use `\#` to match a literal `#` at the
234
- start of a line, or set the `nocomment` flag to suppress this behavior.
235
-
236
- The double-star character `**` is supported by default, unless the
237
- `noglobstar` flag is set. This is supported in the manner of bsdglob
238
- and bash 4.1, where `**` only has special significance if it is the only
239
- thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
240
- `a/**b` will not.
241
-
242
- If an escaped pattern has no matches, and the `nonull` flag is set,
243
- then minimatch.match returns the pattern as-provided, rather than
244
- interpreting the character escapes. For example,
245
- `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
246
- `"*a?"`. This is akin to setting the `nullglob` option in bash, except
247
- that it does not resolve escaped pattern characters.
248
-
249
- If brace expansion is not disabled, then it is performed before any
250
- other interpretation of the glob pattern. Thus, a pattern like
251
- `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
252
- **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
253
- checked for validity. Since those two are valid, matching proceeds.
254
-
255
- Note that `fnmatch(3)` in libc is an extremely naive string comparison
256
- matcher, which does not do anything special for slashes. This library is
257
- designed to be used in glob searching and file walkers, and so it does do
258
- special things with `/`. Thus, `foo*` will not match `foo/bar` in this
259
- library, even though it would in `fnmatch(3)`.
@@ -1,4 +0,0 @@
1
- const isWindows = typeof process === 'object' &&
2
- process &&
3
- process.platform === 'win32'
4
- module.exports = isWindows ? { sep: '\\' } : { sep: '/' }