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,203 +0,0 @@
1
- var balanced = require('balanced-match');
2
-
3
- module.exports = expandTop;
4
-
5
- var escSlash = '\0SLASH'+Math.random()+'\0';
6
- var escOpen = '\0OPEN'+Math.random()+'\0';
7
- var escClose = '\0CLOSE'+Math.random()+'\0';
8
- var escComma = '\0COMMA'+Math.random()+'\0';
9
- var escPeriod = '\0PERIOD'+Math.random()+'\0';
10
-
11
- function numeric(str) {
12
- return parseInt(str, 10) == str
13
- ? parseInt(str, 10)
14
- : str.charCodeAt(0);
15
- }
16
-
17
- function escapeBraces(str) {
18
- return str.split('\\\\').join(escSlash)
19
- .split('\\{').join(escOpen)
20
- .split('\\}').join(escClose)
21
- .split('\\,').join(escComma)
22
- .split('\\.').join(escPeriod);
23
- }
24
-
25
- function unescapeBraces(str) {
26
- return str.split(escSlash).join('\\')
27
- .split(escOpen).join('{')
28
- .split(escClose).join('}')
29
- .split(escComma).join(',')
30
- .split(escPeriod).join('.');
31
- }
32
-
33
-
34
- // Basically just str.split(","), but handling cases
35
- // where we have nested braced sections, which should be
36
- // treated as individual members, like {a,{b,c},d}
37
- function parseCommaParts(str) {
38
- if (!str)
39
- return [''];
40
-
41
- var parts = [];
42
- var m = balanced('{', '}', str);
43
-
44
- if (!m)
45
- return str.split(',');
46
-
47
- var pre = m.pre;
48
- var body = m.body;
49
- var post = m.post;
50
- var p = pre.split(',');
51
-
52
- p[p.length-1] += '{' + body + '}';
53
- var postParts = parseCommaParts(post);
54
- if (post.length) {
55
- p[p.length-1] += postParts.shift();
56
- p.push.apply(p, postParts);
57
- }
58
-
59
- parts.push.apply(parts, p);
60
-
61
- return parts;
62
- }
63
-
64
- function expandTop(str) {
65
- if (!str)
66
- return [];
67
-
68
- // I don't know why Bash 4.3 does this, but it does.
69
- // Anything starting with {} will have the first two bytes preserved
70
- // but *only* at the top level, so {},a}b will not expand to anything,
71
- // but a{},b}c will be expanded to [a}c,abc].
72
- // One could argue that this is a bug in Bash, but since the goal of
73
- // this module is to match Bash's rules, we escape a leading {}
74
- if (str.substr(0, 2) === '{}') {
75
- str = '\\{\\}' + str.substr(2);
76
- }
77
-
78
- return expand(escapeBraces(str), true).map(unescapeBraces);
79
- }
80
-
81
- function embrace(str) {
82
- return '{' + str + '}';
83
- }
84
- function isPadded(el) {
85
- return /^-?0\d/.test(el);
86
- }
87
-
88
- function lte(i, y) {
89
- return i <= y;
90
- }
91
- function gte(i, y) {
92
- return i >= y;
93
- }
94
-
95
- function expand(str, isTop) {
96
- var expansions = [];
97
-
98
- var m = balanced('{', '}', str);
99
- if (!m) return [str];
100
-
101
- // no need to expand pre, since it is guaranteed to be free of brace-sets
102
- var pre = m.pre;
103
- var post = m.post.length
104
- ? expand(m.post, false)
105
- : [''];
106
-
107
- if (/\$$/.test(m.pre)) {
108
- for (var k = 0; k < post.length; k++) {
109
- var expansion = pre+ '{' + m.body + '}' + post[k];
110
- expansions.push(expansion);
111
- }
112
- } else {
113
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
114
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
115
- var isSequence = isNumericSequence || isAlphaSequence;
116
- var isOptions = m.body.indexOf(',') >= 0;
117
- if (!isSequence && !isOptions) {
118
- // {a},b}
119
- if (m.post.match(/,(?!,).*\}/)) {
120
- str = m.pre + '{' + m.body + escClose + m.post;
121
- return expand(str);
122
- }
123
- return [str];
124
- }
125
-
126
- var n;
127
- if (isSequence) {
128
- n = m.body.split(/\.\./);
129
- } else {
130
- n = parseCommaParts(m.body);
131
- if (n.length === 1) {
132
- // x{{a,b}}y ==> x{a}y x{b}y
133
- n = expand(n[0], false).map(embrace);
134
- if (n.length === 1) {
135
- return post.map(function(p) {
136
- return m.pre + n[0] + p;
137
- });
138
- }
139
- }
140
- }
141
-
142
- // at this point, n is the parts, and we know it's not a comma set
143
- // with a single entry.
144
- var N;
145
-
146
- if (isSequence) {
147
- var x = numeric(n[0]);
148
- var y = numeric(n[1]);
149
- var width = Math.max(n[0].length, n[1].length)
150
- var incr = n.length == 3
151
- ? Math.abs(numeric(n[2]))
152
- : 1;
153
- var test = lte;
154
- var reverse = y < x;
155
- if (reverse) {
156
- incr *= -1;
157
- test = gte;
158
- }
159
- var pad = n.some(isPadded);
160
-
161
- N = [];
162
-
163
- for (var i = x; test(i, y); i += incr) {
164
- var c;
165
- if (isAlphaSequence) {
166
- c = String.fromCharCode(i);
167
- if (c === '\\')
168
- c = '';
169
- } else {
170
- c = String(i);
171
- if (pad) {
172
- var need = width - c.length;
173
- if (need > 0) {
174
- var z = new Array(need + 1).join('0');
175
- if (i < 0)
176
- c = '-' + z + c.slice(1);
177
- else
178
- c = z + c;
179
- }
180
- }
181
- }
182
- N.push(c);
183
- }
184
- } else {
185
- N = [];
186
-
187
- for (var j = 0; j < n.length; j++) {
188
- N.push.apply(N, expand(n[j], false));
189
- }
190
- }
191
-
192
- for (var j = 0; j < N.length; j++) {
193
- for (var k = 0; k < post.length; k++) {
194
- var expansion = pre + N[j] + post[k];
195
- if (!isTop || isSequence || expansion)
196
- expansions.push(expansion);
197
- }
198
- }
199
- }
200
-
201
- return expansions;
202
- }
203
-
@@ -1,49 +0,0 @@
1
- {
2
- "name": "brace-expansion",
3
- "description": "Brace expansion as known from sh/bash",
4
- "version": "2.0.2",
5
- "repository": {
6
- "type": "git",
7
- "url": "git://github.com/juliangruber/brace-expansion.git"
8
- },
9
- "homepage": "https://github.com/juliangruber/brace-expansion",
10
- "main": "index.js",
11
- "scripts": {
12
- "test": "tape test/*.js",
13
- "gentest": "bash test/generate.sh",
14
- "bench": "matcha test/perf/bench.js"
15
- },
16
- "dependencies": {
17
- "balanced-match": "^1.0.0"
18
- },
19
- "devDependencies": {
20
- "@c4312/matcha": "^1.3.1",
21
- "tape": "^4.6.0"
22
- },
23
- "keywords": [],
24
- "author": {
25
- "name": "Julian Gruber",
26
- "email": "mail@juliangruber.com",
27
- "url": "http://juliangruber.com"
28
- },
29
- "license": "MIT",
30
- "testling": {
31
- "files": "test/*.js",
32
- "browsers": [
33
- "ie/8..latest",
34
- "firefox/20..latest",
35
- "firefox/nightly",
36
- "chrome/25..latest",
37
- "chrome/canary",
38
- "opera/12..latest",
39
- "opera/next",
40
- "safari/5.1..latest",
41
- "ipad/6.0..latest",
42
- "iphone/6.0..latest",
43
- "android-browser/4.2..latest"
44
- ]
45
- },
46
- "publishConfig": {
47
- "tag": "2.x"
48
- }
49
- }
@@ -1,415 +0,0 @@
1
- /**
2
- Basic foreground colors.
3
-
4
- [More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
5
- */
6
- declare type ForegroundColor =
7
- | 'black'
8
- | 'red'
9
- | 'green'
10
- | 'yellow'
11
- | 'blue'
12
- | 'magenta'
13
- | 'cyan'
14
- | 'white'
15
- | 'gray'
16
- | 'grey'
17
- | 'blackBright'
18
- | 'redBright'
19
- | 'greenBright'
20
- | 'yellowBright'
21
- | 'blueBright'
22
- | 'magentaBright'
23
- | 'cyanBright'
24
- | 'whiteBright';
25
-
26
- /**
27
- Basic background colors.
28
-
29
- [More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
30
- */
31
- declare type BackgroundColor =
32
- | 'bgBlack'
33
- | 'bgRed'
34
- | 'bgGreen'
35
- | 'bgYellow'
36
- | 'bgBlue'
37
- | 'bgMagenta'
38
- | 'bgCyan'
39
- | 'bgWhite'
40
- | 'bgGray'
41
- | 'bgGrey'
42
- | 'bgBlackBright'
43
- | 'bgRedBright'
44
- | 'bgGreenBright'
45
- | 'bgYellowBright'
46
- | 'bgBlueBright'
47
- | 'bgMagentaBright'
48
- | 'bgCyanBright'
49
- | 'bgWhiteBright';
50
-
51
- /**
52
- Basic colors.
53
-
54
- [More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
55
- */
56
- declare type Color = ForegroundColor | BackgroundColor;
57
-
58
- declare type Modifiers =
59
- | 'reset'
60
- | 'bold'
61
- | 'dim'
62
- | 'italic'
63
- | 'underline'
64
- | 'inverse'
65
- | 'hidden'
66
- | 'strikethrough'
67
- | 'visible';
68
-
69
- declare namespace chalk {
70
- /**
71
- Levels:
72
- - `0` - All colors disabled.
73
- - `1` - Basic 16 colors support.
74
- - `2` - ANSI 256 colors support.
75
- - `3` - Truecolor 16 million colors support.
76
- */
77
- type Level = 0 | 1 | 2 | 3;
78
-
79
- interface Options {
80
- /**
81
- Specify the color support for Chalk.
82
-
83
- By default, color support is automatically detected based on the environment.
84
-
85
- Levels:
86
- - `0` - All colors disabled.
87
- - `1` - Basic 16 colors support.
88
- - `2` - ANSI 256 colors support.
89
- - `3` - Truecolor 16 million colors support.
90
- */
91
- level?: Level;
92
- }
93
-
94
- /**
95
- Return a new Chalk instance.
96
- */
97
- type Instance = new (options?: Options) => Chalk;
98
-
99
- /**
100
- Detect whether the terminal supports color.
101
- */
102
- interface ColorSupport {
103
- /**
104
- The color level used by Chalk.
105
- */
106
- level: Level;
107
-
108
- /**
109
- Return whether Chalk supports basic 16 colors.
110
- */
111
- hasBasic: boolean;
112
-
113
- /**
114
- Return whether Chalk supports ANSI 256 colors.
115
- */
116
- has256: boolean;
117
-
118
- /**
119
- Return whether Chalk supports Truecolor 16 million colors.
120
- */
121
- has16m: boolean;
122
- }
123
-
124
- interface ChalkFunction {
125
- /**
126
- Use a template string.
127
-
128
- @remarks Template literals are unsupported for nested calls (see [issue #341](https://github.com/chalk/chalk/issues/341))
129
-
130
- @example
131
- ```
132
- import chalk = require('chalk');
133
-
134
- log(chalk`
135
- CPU: {red ${cpu.totalPercent}%}
136
- RAM: {green ${ram.used / ram.total * 100}%}
137
- DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
138
- `);
139
- ```
140
-
141
- @example
142
- ```
143
- import chalk = require('chalk');
144
-
145
- log(chalk.red.bgBlack`2 + 3 = {bold ${2 + 3}}`)
146
- ```
147
- */
148
- (text: TemplateStringsArray, ...placeholders: unknown[]): string;
149
-
150
- (...text: unknown[]): string;
151
- }
152
-
153
- interface Chalk extends ChalkFunction {
154
- /**
155
- Return a new Chalk instance.
156
- */
157
- Instance: Instance;
158
-
159
- /**
160
- The color support for Chalk.
161
-
162
- By default, color support is automatically detected based on the environment.
163
-
164
- Levels:
165
- - `0` - All colors disabled.
166
- - `1` - Basic 16 colors support.
167
- - `2` - ANSI 256 colors support.
168
- - `3` - Truecolor 16 million colors support.
169
- */
170
- level: Level;
171
-
172
- /**
173
- Use HEX value to set text color.
174
-
175
- @param color - Hexadecimal value representing the desired color.
176
-
177
- @example
178
- ```
179
- import chalk = require('chalk');
180
-
181
- chalk.hex('#DEADED');
182
- ```
183
- */
184
- hex(color: string): Chalk;
185
-
186
- /**
187
- Use keyword color value to set text color.
188
-
189
- @param color - Keyword value representing the desired color.
190
-
191
- @example
192
- ```
193
- import chalk = require('chalk');
194
-
195
- chalk.keyword('orange');
196
- ```
197
- */
198
- keyword(color: string): Chalk;
199
-
200
- /**
201
- Use RGB values to set text color.
202
- */
203
- rgb(red: number, green: number, blue: number): Chalk;
204
-
205
- /**
206
- Use HSL values to set text color.
207
- */
208
- hsl(hue: number, saturation: number, lightness: number): Chalk;
209
-
210
- /**
211
- Use HSV values to set text color.
212
- */
213
- hsv(hue: number, saturation: number, value: number): Chalk;
214
-
215
- /**
216
- Use HWB values to set text color.
217
- */
218
- hwb(hue: number, whiteness: number, blackness: number): Chalk;
219
-
220
- /**
221
- Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set text color.
222
-
223
- 30 <= code && code < 38 || 90 <= code && code < 98
224
- For example, 31 for red, 91 for redBright.
225
- */
226
- ansi(code: number): Chalk;
227
-
228
- /**
229
- Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
230
- */
231
- ansi256(index: number): Chalk;
232
-
233
- /**
234
- Use HEX value to set background color.
235
-
236
- @param color - Hexadecimal value representing the desired color.
237
-
238
- @example
239
- ```
240
- import chalk = require('chalk');
241
-
242
- chalk.bgHex('#DEADED');
243
- ```
244
- */
245
- bgHex(color: string): Chalk;
246
-
247
- /**
248
- Use keyword color value to set background color.
249
-
250
- @param color - Keyword value representing the desired color.
251
-
252
- @example
253
- ```
254
- import chalk = require('chalk');
255
-
256
- chalk.bgKeyword('orange');
257
- ```
258
- */
259
- bgKeyword(color: string): Chalk;
260
-
261
- /**
262
- Use RGB values to set background color.
263
- */
264
- bgRgb(red: number, green: number, blue: number): Chalk;
265
-
266
- /**
267
- Use HSL values to set background color.
268
- */
269
- bgHsl(hue: number, saturation: number, lightness: number): Chalk;
270
-
271
- /**
272
- Use HSV values to set background color.
273
- */
274
- bgHsv(hue: number, saturation: number, value: number): Chalk;
275
-
276
- /**
277
- Use HWB values to set background color.
278
- */
279
- bgHwb(hue: number, whiteness: number, blackness: number): Chalk;
280
-
281
- /**
282
- Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set background color.
283
-
284
- 30 <= code && code < 38 || 90 <= code && code < 98
285
- For example, 31 for red, 91 for redBright.
286
- Use the foreground code, not the background code (for example, not 41, nor 101).
287
- */
288
- bgAnsi(code: number): Chalk;
289
-
290
- /**
291
- Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color.
292
- */
293
- bgAnsi256(index: number): Chalk;
294
-
295
- /**
296
- Modifier: Resets the current color chain.
297
- */
298
- readonly reset: Chalk;
299
-
300
- /**
301
- Modifier: Make text bold.
302
- */
303
- readonly bold: Chalk;
304
-
305
- /**
306
- Modifier: Emitting only a small amount of light.
307
- */
308
- readonly dim: Chalk;
309
-
310
- /**
311
- Modifier: Make text italic. (Not widely supported)
312
- */
313
- readonly italic: Chalk;
314
-
315
- /**
316
- Modifier: Make text underline. (Not widely supported)
317
- */
318
- readonly underline: Chalk;
319
-
320
- /**
321
- Modifier: Inverse background and foreground colors.
322
- */
323
- readonly inverse: Chalk;
324
-
325
- /**
326
- Modifier: Prints the text, but makes it invisible.
327
- */
328
- readonly hidden: Chalk;
329
-
330
- /**
331
- Modifier: Puts a horizontal line through the center of the text. (Not widely supported)
332
- */
333
- readonly strikethrough: Chalk;
334
-
335
- /**
336
- Modifier: Prints the text only when Chalk has a color support level > 0.
337
- Can be useful for things that are purely cosmetic.
338
- */
339
- readonly visible: Chalk;
340
-
341
- readonly black: Chalk;
342
- readonly red: Chalk;
343
- readonly green: Chalk;
344
- readonly yellow: Chalk;
345
- readonly blue: Chalk;
346
- readonly magenta: Chalk;
347
- readonly cyan: Chalk;
348
- readonly white: Chalk;
349
-
350
- /*
351
- Alias for `blackBright`.
352
- */
353
- readonly gray: Chalk;
354
-
355
- /*
356
- Alias for `blackBright`.
357
- */
358
- readonly grey: Chalk;
359
-
360
- readonly blackBright: Chalk;
361
- readonly redBright: Chalk;
362
- readonly greenBright: Chalk;
363
- readonly yellowBright: Chalk;
364
- readonly blueBright: Chalk;
365
- readonly magentaBright: Chalk;
366
- readonly cyanBright: Chalk;
367
- readonly whiteBright: Chalk;
368
-
369
- readonly bgBlack: Chalk;
370
- readonly bgRed: Chalk;
371
- readonly bgGreen: Chalk;
372
- readonly bgYellow: Chalk;
373
- readonly bgBlue: Chalk;
374
- readonly bgMagenta: Chalk;
375
- readonly bgCyan: Chalk;
376
- readonly bgWhite: Chalk;
377
-
378
- /*
379
- Alias for `bgBlackBright`.
380
- */
381
- readonly bgGray: Chalk;
382
-
383
- /*
384
- Alias for `bgBlackBright`.
385
- */
386
- readonly bgGrey: Chalk;
387
-
388
- readonly bgBlackBright: Chalk;
389
- readonly bgRedBright: Chalk;
390
- readonly bgGreenBright: Chalk;
391
- readonly bgYellowBright: Chalk;
392
- readonly bgBlueBright: Chalk;
393
- readonly bgMagentaBright: Chalk;
394
- readonly bgCyanBright: Chalk;
395
- readonly bgWhiteBright: Chalk;
396
- }
397
- }
398
-
399
- /**
400
- Main Chalk object that allows to chain styles together.
401
- Call the last one as a method with a string argument.
402
- Order doesn't matter, and later styles take precedent in case of a conflict.
403
- This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
404
- */
405
- declare const chalk: chalk.Chalk & chalk.ChalkFunction & {
406
- supportsColor: chalk.ColorSupport | false;
407
- Level: chalk.Level;
408
- Color: Color;
409
- ForegroundColor: ForegroundColor;
410
- BackgroundColor: BackgroundColor;
411
- Modifiers: Modifiers;
412
- stderr: chalk.Chalk & {supportsColor: chalk.ColorSupport | false};
413
- };
414
-
415
- export = chalk;
@@ -1,9 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.