docworks 0.16.0 → 0.17.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +24 -34
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +4 -4
- package/dist/providers/index.js.map +1 -1
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Caio Pizzol
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -27,6 +27,8 @@ DocWorks tests documentation the way developers actually use it - by having AI s
|
|
|
27
27
|
|
|
28
28
|
## Configuration
|
|
29
29
|
|
|
30
|
+
See [`schema.yaml`](./schema.yaml) for the complete configuration schema with validation rules.
|
|
31
|
+
|
|
30
32
|
### Simple Questions
|
|
31
33
|
|
|
32
34
|
```yaml
|
|
@@ -38,7 +40,7 @@ questions:
|
|
|
38
40
|
- What are the rate limits?
|
|
39
41
|
- Where are code examples?
|
|
40
42
|
|
|
41
|
-
provider: openai
|
|
43
|
+
provider: openai # Currently only OpenAI supported
|
|
42
44
|
model: gpt-4o-mini
|
|
43
45
|
```
|
|
44
46
|
|
|
@@ -137,40 +139,15 @@ jobs:
|
|
|
137
139
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
138
140
|
```
|
|
139
141
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
Test against multiple AI models:
|
|
142
|
+
## Supported Providers
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
144
|
+
| Provider | Status | Models |
|
|
145
|
+
| --------- | -------------- | ---------------------------------- |
|
|
146
|
+
| OpenAI | ✅ Supported | gpt-4o, gpt-4o-mini |
|
|
147
|
+
| Anthropic | 🚧 Coming Soon | claude-3.7-sonnet, claude-4-sonnet |
|
|
148
|
+
| Google | 🚧 Coming Soon | gemini-pro |
|
|
148
149
|
|
|
149
|
-
|
|
150
|
-
validate:
|
|
151
|
-
strategy:
|
|
152
|
-
matrix:
|
|
153
|
-
include:
|
|
154
|
-
- provider: openai
|
|
155
|
-
model: gpt-4o
|
|
156
|
-
threshold: 90
|
|
157
|
-
- provider: openai
|
|
158
|
-
model: gpt-4o-mini
|
|
159
|
-
threshold: 85
|
|
160
|
-
- provider: anthropic
|
|
161
|
-
model: claude-3-opus
|
|
162
|
-
threshold: 90
|
|
163
|
-
|
|
164
|
-
runs-on: ubuntu-latest
|
|
165
|
-
steps:
|
|
166
|
-
- uses: actions/checkout@v3
|
|
167
|
-
- run: npx docworks check --threshold ${{ matrix.threshold }}
|
|
168
|
-
env:
|
|
169
|
-
PROVIDER: ${{ matrix.provider }}
|
|
170
|
-
MODEL: ${{ matrix.model }}
|
|
171
|
-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
172
|
-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
173
|
-
```
|
|
150
|
+
**Want to add a provider?** PRs welcome! See [`src/providers/index.ts`](./src/providers/index.ts).
|
|
174
151
|
|
|
175
152
|
## Supported Documentation
|
|
176
153
|
|
|
@@ -218,6 +195,19 @@ Start lenient and increase strictness as your documentation improves:
|
|
|
218
195
|
3. **Staging** - `threshold: 90` (nearly complete)
|
|
219
196
|
4. **Production** - `threshold: 95-100` (comprehensive docs)
|
|
220
197
|
|
|
198
|
+
## Requirements
|
|
199
|
+
|
|
200
|
+
- Node.js 16+
|
|
201
|
+
- OpenAI API key with web search capabilities
|
|
202
|
+
|
|
203
|
+
## Contributing
|
|
204
|
+
|
|
205
|
+
Contributions welcome! We're especially looking for:
|
|
206
|
+
|
|
207
|
+
- Additional provider implementations (Anthropic, Google)
|
|
208
|
+
- Documentation platform integrations
|
|
209
|
+
- Journey templates for common use cases
|
|
210
|
+
|
|
221
211
|
## Why DocWorks?
|
|
222
212
|
|
|
223
213
|
- **Real-world testing** - AI navigates docs like developers do
|
|
@@ -228,4 +218,4 @@ Start lenient and increase strictness as your documentation improves:
|
|
|
228
218
|
|
|
229
219
|
## License
|
|
230
220
|
|
|
231
|
-
MIT
|
|
221
|
+
MIT - See [LICENSE](./LICENSE) for details
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAoCrD,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAoCrD,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,gBAAgB,CAAC,CAkE3B"}
|
package/dist/providers/index.js
CHANGED
|
@@ -83,10 +83,10 @@ Instructions:
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
// Future providers - PRs welcome!
|
|
87
|
+
case 'anthropic':
|
|
88
|
+
case 'google':
|
|
89
|
+
throw new Error(`${provider} provider coming soon. Currently only 'openai' is supported.`);
|
|
90
90
|
default:
|
|
91
91
|
throw new Error(`Unknown provider: ${provider}`);
|
|
92
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAG3B,MAAM,iBAAiB,GAAG;IACxB,IAAI,EAAE,aAAsB;IAC5B,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC;aAC/B;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sBAAsB;aACpC;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ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