promptgraph-mcp 2.4.6 → 2.4.7

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 (87) hide show
  1. package/github-import.js +4 -4
  2. package/index.js +47 -14
  3. package/indexer.js +14 -7
  4. package/package.json +1 -1
  5. package/parser.js +21 -115
  6. package/registry/training/bad/accepts-HISTORY.md +250 -0
  7. package/registry/training/bad/argparse-CHANGELOG.md +185 -0
  8. package/registry/training/bad/balanced-match-LICENSE.md +23 -0
  9. package/registry/training/bad/better-sqlite3-README.md +99 -0
  10. package/registry/training/bad/bindings-LICENSE.md +22 -0
  11. package/registry/training/bad/bl-LICENSE.md +13 -0
  12. package/registry/training/bad/body-parser-README.md +494 -0
  13. package/registry/training/bad/bytes-HISTORY.md +97 -0
  14. package/registry/training/bad/camelcase-README.md +135 -0
  15. package/registry/training/bad/chai-README.md +162 -0
  16. package/registry/training/bad/cli-progress-LICENSE.md +24 -0
  17. package/registry/training/bad/content-type-HISTORY.md +29 -0
  18. package/registry/training/bad/cookie-SECURITY.md +25 -0
  19. package/registry/training/bad/cookie-signature-HISTORY.md +70 -0
  20. package/registry/training/bad/cors-README.md +277 -0
  21. package/registry/training/bad/cross-spawn-README.md +89 -0
  22. package/registry/training/bad/deep-extend-CHANGELOG.md +46 -0
  23. package/registry/training/bad/depd-HISTORY.md +103 -0
  24. package/registry/training/bad/esprima-README.md +46 -0
  25. package/registry/training/bad/etag-HISTORY.md +83 -0
  26. package/registry/training/bad/expect-type-SECURITY.md +14 -0
  27. package/registry/training/bad/finalhandler-HISTORY.md +239 -0
  28. package/registry/training/bad/fresh-HISTORY.md +80 -0
  29. package/registry/training/bad/glob-LICENSE.md +63 -0
  30. package/registry/training/bad/hono-README.md +85 -0
  31. package/registry/training/bad/http-errors-HISTORY.md +186 -0
  32. package/registry/training/bad/jose-LICENSE.md +21 -0
  33. package/registry/training/bad/jose-README.md +153 -0
  34. package/registry/training/bad/js-yaml-README.md +299 -0
  35. package/registry/training/bad/json-schema-typed-LICENSE.md +57 -0
  36. package/registry/training/bad/json-stringify-safe-CHANGELOG.md +14 -0
  37. package/registry/training/bad/lru-cache-LICENSE.md +55 -0
  38. package/registry/training/bad/media-typer-HISTORY.md +50 -0
  39. package/registry/training/bad/minimatch-LICENSE.md +55 -0
  40. package/registry/training/bad/minimist-CHANGELOG.md +298 -0
  41. package/registry/training/bad/minimist-README.md +121 -0
  42. package/registry/training/bad/ms-LICENSE.md +21 -0
  43. package/registry/training/bad/negotiator-HISTORY.md +114 -0
  44. package/registry/training/bad/on-finished-HISTORY.md +98 -0
  45. package/registry/training/bad/pkce-challenge-CHANGELOG.md +114 -0
  46. package/registry/training/bad/postcss-README.md +28 -0
  47. package/registry/training/bad/prebuild-install-CHANGELOG.md +131 -0
  48. package/registry/training/bad/proxy-addr-HISTORY.md +161 -0
  49. package/registry/training/bad/qs-CHANGELOG.md +822 -0
  50. package/registry/training/bad/rc-README.md +227 -0
  51. package/registry/training/bad/readable-stream-CONTRIBUTING.md +38 -0
  52. package/registry/training/bad/router-HISTORY.md +228 -0
  53. package/registry/training/bad/semver-README.md +680 -0
  54. package/registry/training/bad/send-README.md +317 -0
  55. package/registry/training/bad/serve-static-README.md +253 -0
  56. package/registry/training/bad/statuses-HISTORY.md +87 -0
  57. package/registry/training/bad/type-is-HISTORY.md +292 -0
  58. package/registry/training/bad/vary-HISTORY.md +39 -0
  59. package/registry/training/bad/vite-LICENSE.md +2230 -0
  60. package/registry/training/bad/which-CHANGELOG.md +166 -0
  61. package/registry/training/bad/zod-README.md +191 -0
  62. package/registry/training/good/skills-store-autopilot.md +85 -0
  63. package/registry/training/good/skills-store-bot-builder.md +70 -0
  64. package/registry/training/good/skills-store-chain.md +136 -0
  65. package/registry/training/good/skills-store-evolve.md +100 -0
  66. package/registry/training/good/skills-store-game.md +27 -0
  67. package/registry/training/good/skills-store-hunt.md +102 -0
  68. package/registry/training/good/skills-store-intel.md +56 -0
  69. package/registry/training/good/skills-store-memory-gc.md +58 -0
  70. package/registry/training/good/skills-store-pcsort.md +207 -0
  71. package/registry/training/good/skills-store-pickup.md +60 -0
  72. package/registry/training/good/skills-store-recon.md +141 -0
  73. package/registry/training/good/skills-store-remember.md +64 -0
  74. package/registry/training/good/skills-store-report.md +117 -0
  75. package/registry/training/good/skills-store-router.md +225 -0
  76. package/registry/training/good/skills-store-search.md +168 -0
  77. package/registry/training/good/skills-store-surface.md +53 -0
  78. package/registry/training/good/skills-store-token-scan.md +141 -0
  79. package/registry/training/good/skills-store-triage.md +97 -0
  80. package/registry/training/good/skills-store-unity.md +733 -0
  81. package/registry/training/good/skills-store-validate.md +135 -0
  82. package/registry/training/good/skills-store-web3-audit.md +217 -0
  83. package/src/filter/classifier.js +88 -0
  84. package/src/filter/cluster.js +52 -0
  85. package/src/filter/dedup.js +36 -0
  86. package/src/filter/hard-filter.js +57 -0
  87. package/src/filter/train.js +64 -0
@@ -0,0 +1,227 @@
1
+ # rc
2
+
3
+ The non-configurable configuration loader for lazy people.
4
+
5
+ ## Usage
6
+
7
+ The only option is to pass rc the name of your app, and your default configuration.
8
+
9
+ ```javascript
10
+ var conf = require('rc')(appname, {
11
+ //defaults go here.
12
+ port: 2468,
13
+
14
+ //defaults which are objects will be merged, not replaced
15
+ views: {
16
+ engine: 'jade'
17
+ }
18
+ });
19
+ ```
20
+
21
+ `rc` will return your configuration options merged with the defaults you specify.
22
+ If you pass in a predefined defaults object, it will be mutated:
23
+
24
+ ```javascript
25
+ var conf = {};
26
+ require('rc')(appname, conf);
27
+ ```
28
+
29
+ If `rc` finds any config files for your app, the returned config object will have
30
+ a `configs` array containing their paths:
31
+
32
+ ```javascript
33
+ var appCfg = require('rc')(appname, conf);
34
+ appCfg.configs[0] // /etc/appnamerc
35
+ appCfg.configs[1] // /home/dominictarr/.config/appname
36
+ appCfg.config // same as appCfg.configs[appCfg.configs.length - 1]
37
+ ```
38
+
39
+ ## Standards
40
+
41
+ Given your application name (`appname`), rc will look in all the obvious places for configuration.
42
+
43
+ * command line arguments, parsed by minimist _(e.g. `--foo baz`, also nested: `--foo.bar=baz`)_
44
+ * environment variables prefixed with `${appname}_`
45
+ * or use "\_\_" to indicate nested properties <br/> _(e.g. `appname_foo__bar__baz` => `foo.bar.baz`)_
46
+ * if you passed an option `--config file` then from that file
47
+ * a local `.${appname}rc` or the first found looking in `./ ../ ../../ ../../../` etc.
48
+ * `$HOME/.${appname}rc`
49
+ * `$HOME/.${appname}/config`
50
+ * `$HOME/.config/${appname}`
51
+ * `$HOME/.config/${appname}/config`
52
+ * `/etc/${appname}rc`
53
+ * `/etc/${appname}/config`
54
+ * the defaults object you passed in.
55
+
56
+ All configuration sources that were found will be flattened into one object,
57
+ so that sources **earlier** in this list override later ones.
58
+
59
+
60
+ ## Configuration File Formats
61
+
62
+ Configuration files (e.g. `.appnamerc`) may be in either [json](http://json.org/example) or [ini](http://en.wikipedia.org/wiki/INI_file) format. **No** file extension (`.json` or `.ini`) should be used. The example configurations below are equivalent:
63
+
64
+
65
+ #### Formatted as `ini`
66
+
67
+ ```
68
+ ; You can include comments in `ini` format if you want.
69
+
70
+ dependsOn=0.10.0
71
+
72
+
73
+ ; `rc` has built-in support for ini sections, see?
74
+
75
+ [commands]
76
+ www = ./commands/www
77
+ console = ./commands/repl
78
+
79
+
80
+ ; You can even do nested sections
81
+
82
+ [generators.options]
83
+ engine = ejs
84
+
85
+ [generators.modules]
86
+ new = generate-new
87
+ engine = generate-backend
88
+
89
+ ```
90
+
91
+ #### Formatted as `json`
92
+
93
+ ```javascript
94
+ {
95
+ // You can even comment your JSON, if you want
96
+ "dependsOn": "0.10.0",
97
+ "commands": {
98
+ "www": "./commands/www",
99
+ "console": "./commands/repl"
100
+ },
101
+ "generators": {
102
+ "options": {
103
+ "engine": "ejs"
104
+ },
105
+ "modules": {
106
+ "new": "generate-new",
107
+ "backend": "generate-backend"
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ Comments are stripped from JSON config via [strip-json-comments](https://github.com/sindresorhus/strip-json-comments).
114
+
115
+ > Since ini, and env variables do not have a standard for types, your application needs be prepared for strings.
116
+
117
+ To ensure that string representations of booleans and numbers are always converted into their proper types (especially useful if you intend to do strict `===` comparisons), consider using a module such as [parse-strings-in-object](https://github.com/anselanza/parse-strings-in-object) to wrap the config object returned from rc.
118
+
119
+
120
+ ## Simple example demonstrating precedence
121
+ Assume you have an application like this (notice the hard-coded defaults passed to rc):
122
+ ```
123
+ const conf = require('rc')('myapp', {
124
+ port: 12345,
125
+ mode: 'test'
126
+ });
127
+
128
+ console.log(JSON.stringify(conf, null, 2));
129
+ ```
130
+ You also have a file `config.json`, with these contents:
131
+ ```
132
+ {
133
+ "port": 9000,
134
+ "foo": "from config json",
135
+ "something": "else"
136
+ }
137
+ ```
138
+ And a file `.myapprc` in the same folder, with these contents:
139
+ ```
140
+ {
141
+ "port": "3001",
142
+ "foo": "bar"
143
+ }
144
+ ```
145
+ Here is the expected output from various commands:
146
+
147
+ `node .`
148
+ ```
149
+ {
150
+ "port": "3001",
151
+ "mode": "test",
152
+ "foo": "bar",
153
+ "_": [],
154
+ "configs": [
155
+ "/Users/stephen/repos/conftest/.myapprc"
156
+ ],
157
+ "config": "/Users/stephen/repos/conftest/.myapprc"
158
+ }
159
+ ```
160
+ *Default `mode` from hard-coded object is retained, but port is overridden by `.myapprc` file (automatically found based on appname match), and `foo` is added.*
161
+
162
+
163
+ `node . --foo baz`
164
+ ```
165
+ {
166
+ "port": "3001",
167
+ "mode": "test",
168
+ "foo": "baz",
169
+ "_": [],
170
+ "configs": [
171
+ "/Users/stephen/repos/conftest/.myapprc"
172
+ ],
173
+ "config": "/Users/stephen/repos/conftest/.myapprc"
174
+ }
175
+ ```
176
+ *Same result as above but `foo` is overridden because command-line arguments take precedence over `.myapprc` file.*
177
+
178
+ `node . --foo barbar --config config.json`
179
+ ```
180
+ {
181
+ "port": 9000,
182
+ "mode": "test",
183
+ "foo": "barbar",
184
+ "something": "else",
185
+ "_": [],
186
+ "config": "config.json",
187
+ "configs": [
188
+ "/Users/stephen/repos/conftest/.myapprc",
189
+ "config.json"
190
+ ]
191
+ }
192
+ ```
193
+ *Now the `port` comes from the `config.json` file specified (overriding the value from `.myapprc`), and `foo` value is overriden by command-line despite also being specified in the `config.json` file.*
194
+
195
+
196
+
197
+ ## Advanced Usage
198
+
199
+ #### Pass in your own `argv`
200
+
201
+ You may pass in your own `argv` as the third argument to `rc`. This is in case you want to [use your own command-line opts parser](https://github.com/dominictarr/rc/pull/12).
202
+
203
+ ```javascript
204
+ require('rc')(appname, defaults, customArgvParser);
205
+ ```
206
+
207
+ ## Pass in your own parser
208
+
209
+ If you have a special need to use a non-standard parser,
210
+ you can do so by passing in the parser as the 4th argument.
211
+ (leave the 3rd as null to get the default args parser)
212
+
213
+ ```javascript
214
+ require('rc')(appname, defaults, null, parser);
215
+ ```
216
+
217
+ This may also be used to force a more strict format,
218
+ such as strict, valid JSON only.
219
+
220
+ ## Note on Performance
221
+
222
+ `rc` is running `fs.statSync`-- so make sure you don't use it in a hot code path (e.g. a request handler)
223
+
224
+
225
+ ## License
226
+
227
+ Multi-licensed under the two-clause BSD License, MIT License, or Apache License, version 2.0
@@ -0,0 +1,38 @@
1
+ # Developer's Certificate of Origin 1.1
2
+
3
+ By making a contribution to this project, I certify that:
4
+
5
+ * (a) The contribution was created in whole or in part by me and I
6
+ have the right to submit it under the open source license
7
+ indicated in the file; or
8
+
9
+ * (b) The contribution is based upon previous work that, to the best
10
+ of my knowledge, is covered under an appropriate open source
11
+ license and I have the right under that license to submit that
12
+ work with modifications, whether created in whole or in part
13
+ by me, under the same open source license (unless I am
14
+ permitted to submit under a different license), as indicated
15
+ in the file; or
16
+
17
+ * (c) The contribution was provided directly to me by some other
18
+ person who certified (a), (b) or (c) and I have not modified
19
+ it.
20
+
21
+ * (d) I understand and agree that this project and the contribution
22
+ are public and that a record of the contribution (including all
23
+ personal information I submit with it, including my sign-off) is
24
+ maintained indefinitely and may be redistributed consistent with
25
+ this project or the open source license(s) involved.
26
+
27
+ ## Moderation Policy
28
+
29
+ The [Node.js Moderation Policy] applies to this WG.
30
+
31
+ ## Code of Conduct
32
+
33
+ The [Node.js Code of Conduct][] applies to this WG.
34
+
35
+ [Node.js Code of Conduct]:
36
+ https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
37
+ [Node.js Moderation Policy]:
38
+ https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
@@ -0,0 +1,228 @@
1
+ 2.2.0 / 2025-03-26
2
+ ==================
3
+
4
+ * Remove `setImmediate` support check
5
+ * Restore `debug` dependency
6
+
7
+ 2.1.0 / 2025-02-10
8
+ ==================
9
+
10
+ * Updated `engines` field to Node@18 or higher
11
+ * Remove `Object.setPrototypeOf` polyfill
12
+ * Use `Array.flat` instead of `array-flatten` package
13
+ * Replace `methods` dependency with standard library
14
+ * deps: parseurl@^1.3.3
15
+ * deps: is-promise@^4.0.0
16
+ * Replace `utils-merge` dependency with `Object.assign`
17
+ * deps: Remove unused dep `after`
18
+
19
+ 2.0.0 / 2024-09-09
20
+ ==================
21
+
22
+ * Drop support for node <18
23
+ * deps: path-to-regexp@^8.0.0
24
+ - Drop support for partial capture group `router.route('/user(s?)/:user/:op')` but still have optional non-capture `/user{s}/:user/:op`
25
+ - `:name?` becomes `{:name}`
26
+ - `:name*` becomes `*name`.
27
+ - The splat change also changes splat from strings to an array of strings
28
+ - Optional splats become `{*name}`
29
+ - `:name+` becomes `*name` and thus equivalent to `*name` so I dropped those tests
30
+ - Strings as regular expressions are fully removed, need to be converted to native regular expressions
31
+
32
+ 2.0.0-beta.2 / 2024-03-20
33
+ =========================
34
+
35
+ This incorporates all changes after 1.3.5 up to 1.3.8.
36
+
37
+ * Add support for returned, rejected Promises to `router.param`
38
+
39
+ 2.0.0-beta.1 / 2020-03-29
40
+ =========================
41
+
42
+ This incorporates all changes after 1.3.3 up to 1.3.5.
43
+
44
+ * Internalize private `router.process_params` method
45
+ * Remove `debug` dependency
46
+ * deps: array-flatten@3.0.0
47
+ * deps: parseurl@~1.3.3
48
+ * deps: path-to-regexp@3.2.0
49
+ - Add new `?`, `*`, and `+` parameter modifiers.
50
+ - Matching group expressions are only RegExp syntax.
51
+ `(*)` is no longer valid and must be written as `(.*)`, for example.
52
+ - Named matching groups no longer available by position in `req.params`.
53
+ `/:foo(.*)` only captures as `req.params.foo` and not available as
54
+ `req.params[0]`.
55
+ - Regular expressions can only be used in a matching group.
56
+ `/\\d+` is no longer valid and must be written as `/(\\d+)`.
57
+ - Matching groups are now literal regular expressions.
58
+ `:foo` named captures can no longer be included inside a capture group.
59
+ - Special `*` path segment behavior removed.
60
+ `/foo/*/bar` will match a literal `*` as the middle segment.
61
+ * deps: setprototypeof@1.2.0
62
+
63
+ 2.0.0-alpha.1 / 2018-07-27
64
+ ==========================
65
+
66
+ * Add basic support for returned, rejected Promises
67
+ - Rejected Promises from middleware functions `next(error)`
68
+ * Drop support for Node.js below 0.10
69
+ * deps: debug@3.1.0
70
+ - Add `DEBUG_HIDE_DATE` environment variable
71
+ - Change timer to per-namespace instead of global
72
+ - Change non-TTY date format
73
+ - Remove `DEBUG_FD` environment variable support
74
+ - Support 256 namespace colors
75
+
76
+ 1.3.8 / 2023-02-24
77
+ ==================
78
+
79
+ * Fix routing requests without method
80
+
81
+ 1.3.7 / 2022-04-28
82
+ ==================
83
+
84
+ * Fix hanging on large stack of sync routes
85
+
86
+ 1.3.6 / 2021-11-15
87
+ ==================
88
+
89
+ * Fix handling very large stacks of sync middleware
90
+ * deps: safe-buffer@5.2.1
91
+
92
+ 1.3.5 / 2020-03-24
93
+ ==================
94
+
95
+ * Fix incorrect middleware execution with unanchored `RegExp`s
96
+ * perf: use plain object for internal method map
97
+
98
+ 1.3.4 / 2020-01-24
99
+ ==================
100
+
101
+ * deps: array-flatten@3.0.0
102
+ * deps: parseurl@~1.3.3
103
+ * deps: setprototypeof@1.2.0
104
+
105
+ 1.3.3 / 2018-07-06
106
+ ==================
107
+
108
+ * Fix JSDoc for `Router` constructor
109
+
110
+ 1.3.2 / 2017-09-24
111
+ ==================
112
+
113
+ * deps: debug@2.6.9
114
+ * deps: parseurl@~1.3.2
115
+ - perf: reduce overhead for full URLs
116
+ - perf: unroll the "fast-path" `RegExp`
117
+ * deps: setprototypeof@1.1.0
118
+ * deps: utils-merge@1.0.1
119
+
120
+ 1.3.1 / 2017-05-19
121
+ ==================
122
+
123
+ * deps: debug@2.6.8
124
+ - Fix `DEBUG_MAX_ARRAY_LENGTH`
125
+ - deps: ms@2.0.0
126
+
127
+ 1.3.0 / 2017-02-25
128
+ ==================
129
+
130
+ * Add `next("router")` to exit from router
131
+ * Fix case where `router.use` skipped requests routes did not
132
+ * Use `%o` in path debug to tell types apart
133
+ * deps: setprototypeof@1.0.3
134
+ * perf: add fast match path for `*` route
135
+
136
+ 1.2.0 / 2017-02-17
137
+ ==================
138
+
139
+ * Skip routing when `req.url` is not set
140
+ * deps: debug@2.6.1
141
+ - Allow colors in workers
142
+ - Deprecated `DEBUG_FD` environment variable set to `3` or higher
143
+ - Fix error when running under React Native
144
+ - Use same color for same namespace
145
+ - deps: ms@0.7.2
146
+
147
+ 1.1.5 / 2017-01-28
148
+ ==================
149
+
150
+ * deps: array-flatten@2.1.1
151
+ * deps: setprototypeof@1.0.2
152
+ - Fix using fallback even when native method exists
153
+
154
+ 1.1.4 / 2016-01-21
155
+ ==================
156
+
157
+ * deps: array-flatten@2.0.0
158
+ * deps: methods@~1.1.2
159
+ - perf: enable strict mode
160
+ * deps: parseurl@~1.3.1
161
+ - perf: enable strict mode
162
+
163
+ 1.1.3 / 2015-08-02
164
+ ==================
165
+
166
+ * Fix infinite loop condition using `mergeParams: true`
167
+ * Fix inner numeric indices incorrectly altering parent `req.params`
168
+ * deps: array-flatten@1.1.1
169
+ - perf: enable strict mode
170
+ * deps: path-to-regexp@0.1.7
171
+ - Fix regression with escaped round brackets and matching groups
172
+
173
+ 1.1.2 / 2015-07-06
174
+ ==================
175
+
176
+ * Fix hiding platform issues with `decodeURIComponent`
177
+ - Only `URIError`s are a 400
178
+ * Fix using `*` before params in routes
179
+ * Fix using capture groups before params in routes
180
+ * deps: path-to-regexp@0.1.6
181
+ * perf: enable strict mode
182
+ * perf: remove argument reassignments in routing
183
+ * perf: skip attempting to decode zero length string
184
+ * perf: use plain for loops
185
+
186
+ 1.1.1 / 2015-05-25
187
+ ==================
188
+
189
+ * Fix issue where `next('route')` in `router.param` would incorrectly skip values
190
+ * deps: array-flatten@1.1.0
191
+ * deps: debug@~2.2.0
192
+ - deps: ms@0.7.1
193
+
194
+ 1.1.0 / 2015-04-22
195
+ ==================
196
+
197
+ * Use `setprototypeof` instead of `__proto__`
198
+ * deps: debug@~2.1.3
199
+ - Fix high intensity foreground color for bold
200
+ - deps: ms@0.7.0
201
+
202
+ 1.0.0 / 2015-01-13
203
+ ==================
204
+
205
+ * Fix crash from error within `OPTIONS` response handler
206
+ * deps: array-flatten@1.0.2
207
+ - Remove redundant code path
208
+
209
+ 1.0.0-beta.3 / 2015-01-11
210
+ =========================
211
+
212
+ * Fix duplicate methods appearing in OPTIONS responses
213
+ * Fix OPTIONS responses to include the HEAD method properly
214
+ * Remove support for leading colon in `router.param(name, fn)`
215
+ * Use `array-flatten` for flattening arrays
216
+ * deps: debug@~2.1.1
217
+ * deps: methods@~1.1.1
218
+
219
+ 1.0.0-beta.2 / 2014-11-19
220
+ =========================
221
+
222
+ * Match routes iteratively to prevent stack overflows
223
+
224
+ 1.0.0-beta.1 / 2014-11-16
225
+ =========================
226
+
227
+ * Initial release ported from Express 4.x
228
+ - Altered to work without Express