@apifuse/provider-sdk 2.1.0-beta.2 → 2.1.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AUTHORING.md CHANGED
@@ -74,6 +74,7 @@ External contributors are expected to submit standalone Provider source plus:
74
74
  - Health coverage table for every Operation.
75
75
  - `bun run check` output.
76
76
  - `bun run test` output.
77
+ - `bun run submit-check` score/verdict and generated `submission-report.md`.
77
78
  - Fixture evidence and known upstream constraints.
78
79
 
79
80
  Maintainers own monorepo import under `providers/<id>/`, registry generation,
@@ -97,6 +98,14 @@ deployment projection checks, and release workflows.
97
98
  chromium` for local Playwright browser assets, or
98
99
  `CDP_POOL_URL`/`APIFUSE_CDP_POOL_URL` for remote browser debugging.
99
100
 
101
+ ### Running the pre-submission report
102
+
103
+ ```bash
104
+ bun run submit-check
105
+ ```
106
+
107
+ The report scores review readiness across definition metadata, operation/schema quality, fixtures/tests, health coverage, local smoke evidence, auth safety, secret hygiene, and submission docs. It is not a payout guarantee; any blocker must be fixed before review. For the complete public-only submission checklist, see `SUBMISSION.md` in the SDK package.
108
+
100
109
  ### Running the lint locally
101
110
 
102
111
  ```bash
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @apifuse/provider-sdk Changelog
2
2
 
3
+ ## 2.1.0-beta.3
4
+
5
+ - Add the public `apifuse submit-check` / `apifuse bounty-check` CLI for score-based pre-submission provider quality checks.
6
+ - Ship `SUBMISSION.md` in the npm package so bounty contributors can follow the checklist without access to the private monorepo.
7
+ - Include submit-check in generated provider validation scripts and packed-artifact smoke coverage.
8
+ - Warn, instead of hard-block, generated OAuth starters that have not yet declared persisted credential keys.
9
+
3
10
  ## 2.1.0-beta.2
4
11
 
5
12
  - Harden public bounty contributor DX with server-contract accurate README and generated Provider smoke examples.
package/README.md CHANGED
@@ -58,6 +58,7 @@ Removed legacy runtime paths are not supported:
58
58
  cd my-provider
59
59
  bun run check
60
60
  bun run test
61
+ bun run submit-check
61
62
  bun run dev
62
63
  ```
63
64
 
@@ -195,6 +196,8 @@ apifuse dev [path]
195
196
  apifuse check [path]
196
197
  apifuse record [path] --operation <operation> --params '{"value":"hello"}'
197
198
  apifuse test [path]
199
+ apifuse submit-check [path] --tier bronze --markdown submission-report.md
200
+ apifuse bounty-check [path]
198
201
  apifuse perf <path> --operation <operation>
199
202
  ```
200
203
 
@@ -203,6 +206,16 @@ apifuse perf <path> --operation <operation>
203
206
  generated local-only `ping` operation intentionally has no upstream and should
204
207
  be replaced before recording fixtures.
205
208
 
209
+ ## Bounty submission readiness
210
+
211
+ Standalone providers include a pre-submission script:
212
+
213
+ ```bash
214
+ bun run submit-check
215
+ ```
216
+
217
+ This runs the public review-readiness evaluator and writes `submission-report.md`. The report contains provider metadata, a 100-point readiness score, hard blockers, warnings, checklist evidence, and remediation. Blockers override the score; fix them before posting bounty evidence. The command is offline-safe by default and does not execute arbitrary upstream calls. Add local smoke notes to your bounty issue after testing `/health` and `POST /v1/{operation}`. See [`SUBMISSION.md`](./SUBMISSION.md) for the full public-only bounty submission checklist shipped in the npm package.
218
+
206
219
  ## Scope boundary
207
220
 
208
221
  Generator v1 scaffolds **TypeScript providers only** for this redesign. Python generation remains future work.
package/SUBMISSION.md ADDED
@@ -0,0 +1,86 @@
1
+ # Provider bounty submission guide
2
+
3
+ This guide is for public bounty contributors who only have access to the published `@apifuse/provider-sdk` package. You do **not** need the private ApiFuse monorepo to build or pre-check a Provider.
4
+
5
+ ## Public-only workflow
6
+
7
+ ```bash
8
+ bunx @apifuse/provider-sdk@beta create my-provider --yes
9
+ cd my-provider
10
+ bun run check
11
+ bun run test
12
+ bun run submit-check
13
+ bun run dev
14
+ ```
15
+
16
+ `bun run submit-check` runs `apifuse submit-check . --markdown submission-report.md` in generated Providers.
17
+
18
+ ## What submit-check scores
19
+
20
+ `apifuse submit-check` produces a 100-point review-readiness score and a verdict:
21
+
22
+ - `ready` — no blockers or warnings and score is at least 90.
23
+ - `reviewable_with_warnings` — no blockers, but reviewers should inspect the warnings.
24
+ - `blocked` — at least one hard blocker must be fixed before review.
25
+
26
+ The score is a triage aid, not a payout guarantee. Maintainers still review correctness, upstream behavior, policy fit, and bounty scope.
27
+
28
+ | Category | Points | Examples |
29
+ |---|---:|---|
30
+ | Definition & metadata | 15 | `defineProvider`, package, Dockerfile, SDK structural checks |
31
+ | Operations & schemas | 15 | strong descriptions, annotations, input/output schemas |
32
+ | Fixtures & tests | 15 | bidirectional fixtures that parse against schemas |
33
+ | Health coverage | 15 | real `healthCheck` or specific `healthCheckUnsupported.reason` |
34
+ | Runtime/local smoke | 10 | `/health` and at least one `POST /v1/{operation}` note |
35
+ | Auth/credential safety | 10 | auth mode and credential declarations are consistent |
36
+ | Security hygiene | 10 | no high-confidence secrets in shareable files |
37
+ | Docs/submission evidence | 10 | README Parameters, Response, Example, submit-check guidance |
38
+
39
+ ## Hard blockers
40
+
41
+ Fix all blockers before submitting:
42
+
43
+ - `bun run check` failures.
44
+ - Provider cannot be imported from `index.ts`.
45
+ - Missing handler/input/output for any Operation.
46
+ - Missing fixture request or response.
47
+ - Fixture data does not parse against schemas.
48
+ - Missing `healthCheck` or `healthCheckUnsupported` on any Operation.
49
+ - Credential-backed auth mode without declared credential keys.
50
+ - High-confidence secret or token material in source, README, package metadata, or fixtures.
51
+
52
+ Warnings do not fail the command, but they should be addressed when practical. For example, the generated starter `ping` operation warns because it is not a real upstream-backed bounty Operation.
53
+
54
+ ## Safe local smoke evidence
55
+
56
+ `submit-check` does not call arbitrary live upstream APIs by default. After replacing starter logic, run the Provider locally and record a short evidence note:
57
+
58
+ ```bash
59
+ bun run dev
60
+ curl -s http://localhost:3900/health
61
+ curl -s -X POST http://localhost:3900/v1/<operation> \
62
+ -H 'Content-Type: application/json' \
63
+ -d '{"requestId":"req_local_smoke","input":{...},"headers":{}}'
64
+
65
+ bun run submit-check -- --smoke-note "GET /health and POST /v1/<operation> passed locally with redacted input."
66
+ ```
67
+
68
+ Never paste real credentials, personal data, account numbers, access tokens, cookies, or unredacted upstream responses into issue comments or reports.
69
+
70
+ ## Submission evidence checklist
71
+
72
+ Include the following when you submit a Provider for review:
73
+
74
+ - Provider SDK version, for example `bun pm ls @apifuse/provider-sdk` or package.json dependency.
75
+ - Provider id, version, runtime, and auth mode.
76
+ - Operation list with input/output summaries.
77
+ - Health coverage table: one row per Operation with `healthCheck` or `healthCheckUnsupported` and rationale.
78
+ - `bun run check` output.
79
+ - `bun run test` output.
80
+ - `submission-report.md` generated by `bun run submit-check`.
81
+ - Local smoke evidence for `/health` and at least one `POST /v1/{operation}` call.
82
+ - Known upstream constraints: rate limits, paid/destructive calls, auth limits, flaky endpoints, or unsupported probes.
83
+
84
+ ## Maintainer-owned follow-up
85
+
86
+ After public evidence is submitted, ApiFuse maintainers import accepted standalone Provider work into the private monorepo and run internal registry, generated artifact, deployment projection, and CI checks. Public contributors are not expected to run those private checks.
@@ -33,6 +33,8 @@ const requiredPaths = [
33
33
  "bin/apifuse.ts",
34
34
  "bin/apifuse-create.ts",
35
35
  "bin/apifuse-pack-smoke.ts",
36
+ "bin/apifuse-submit-check.ts",
37
+ "SUBMISSION.md",
36
38
  "src/cli/create.ts",
37
39
  "src/cli/templates/provider/index.ts.tpl",
38
40
  "src/cli/templates/provider/README.md.tpl",
@@ -117,6 +119,12 @@ function assertPublicSmokeDocs(label: string, content: string): void {
117
119
  );
118
120
  }
119
121
 
122
+ if (!content.includes("submit-check")) {
123
+ throw new Error(
124
+ `${label} must document the submit-check pre-submission workflow.`,
125
+ );
126
+ }
127
+
120
128
  if (
121
129
  !content.includes('browser.engine: "playwright-stealth"') ||
122
130
  !content.includes("nodriver")
@@ -93,6 +93,7 @@ try {
93
93
 
94
94
  const generatedProviderDir = join(consumerDir, "dx-smoke");
95
95
  run("bun", ["run", "check"], generatedProviderDir);
96
+ run("bun", ["run", "submit-check"], generatedProviderDir);
96
97
  run("bun", ["run", "test"], generatedProviderDir);
97
98
  assertGeneratedReadme(generatedProviderDir);
98
99
  await smokeGeneratedDevServer(generatedProviderDir);
@@ -166,6 +167,11 @@ function assertGeneratedReadme(providerDir: string): void {
166
167
  "Generated README is missing Bun trusted-dependency troubleshooting guidance.",
167
168
  );
168
169
  }
170
+ if (!readme.includes("bun run submit-check")) {
171
+ throw new Error(
172
+ "Generated README must document the submit-check pre-submission workflow.",
173
+ );
174
+ }
169
175
  if (!readme.includes("bun run record -- --operation <operation>")) {
170
176
  throw new Error(
171
177
  "Generated README must document fixture recording through the generated record script.",