@apifuse/provider-sdk 2.2.0-beta.5 → 2.2.0-beta.8

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 (66) hide show
  1. package/AUTHORING.md +53 -0
  2. package/CHANGELOG.md +12 -0
  3. package/README.md +5 -1
  4. package/SUBMISSION.md +1 -1
  5. package/bin/apifuse-check.ts +26 -1
  6. package/bin/apifuse-pack-check.ts +14 -0
  7. package/bin/apifuse-submit-check.ts +193 -2
  8. package/bin/apifuse-sync-assets.ts +117 -0
  9. package/dist/auth-turn/index.d.ts +2 -2
  10. package/dist/cli/commands.d.ts +1 -1
  11. package/dist/cli/commands.js +8 -0
  12. package/dist/cli/create.d.ts +3 -0
  13. package/dist/cli/create.js +34 -35
  14. package/dist/cli/prompt-assets.d.ts +80 -0
  15. package/dist/cli/prompt-assets.js +743 -0
  16. package/dist/cli/templates/provider/AGENTS.md.tpl +17 -8
  17. package/dist/config/loader.d.ts +79 -6
  18. package/dist/config/loader.js +272 -48
  19. package/dist/define.js +27 -3
  20. package/dist/index.d.ts +1 -0
  21. package/dist/index.js +1 -0
  22. package/dist/runtime/executor.js +7 -0
  23. package/dist/runtime/http.js +3 -0
  24. package/dist/runtime/proxy-errors.js +6 -2
  25. package/dist/runtime/proxy-nodemaven.d.ts +34 -0
  26. package/dist/runtime/proxy-nodemaven.js +128 -0
  27. package/dist/runtime/proxy-telemetry.d.ts +2 -1
  28. package/dist/runtime/proxy-telemetry.js +39 -4
  29. package/dist/runtime/secrets.d.ts +27 -0
  30. package/dist/runtime/secrets.js +51 -0
  31. package/dist/runtime/stealth.js +20 -9
  32. package/dist/server/serve.d.ts +5 -0
  33. package/dist/server/serve.js +39 -0
  34. package/dist/server/types.d.ts +9 -9
  35. package/dist/types.d.ts +30 -1
  36. package/package.json +4 -3
  37. package/src/cli/commands.ts +10 -0
  38. package/src/cli/create.ts +42 -35
  39. package/src/cli/prompt-assets.ts +865 -0
  40. package/src/cli/templates/provider/AGENTS.md.tpl +17 -8
  41. package/src/config/loader.ts +405 -61
  42. package/src/define.ts +35 -3
  43. package/src/index.ts +5 -0
  44. package/src/runtime/executor.ts +8 -0
  45. package/src/runtime/http.ts +3 -0
  46. package/src/runtime/proxy-errors.ts +12 -4
  47. package/src/runtime/proxy-nodemaven.ts +178 -0
  48. package/src/runtime/proxy-telemetry.ts +56 -5
  49. package/src/runtime/secrets.ts +64 -0
  50. package/src/runtime/stealth.ts +26 -10
  51. package/src/server/serve.ts +53 -0
  52. package/src/types.ts +30 -1
  53. package/dist/cli/templates/provider/CLAUDE.md.tpl +0 -1
  54. package/src/cli/templates/provider/CLAUDE.md.tpl +0 -1
  55. /package/dist/cli/templates/provider/{skills → .agents/skills}/fixtures-and-recording/SKILL.md.tpl +0 -0
  56. /package/dist/cli/templates/provider/{skills → .agents/skills}/health-checks-and-fail-closed/SKILL.md.tpl +0 -0
  57. /package/dist/cli/templates/provider/{skills → .agents/skills}/normalization-standards/SKILL.md.tpl +0 -0
  58. /package/dist/cli/templates/provider/{skills → .agents/skills}/pagination-and-counts/SKILL.md.tpl +0 -0
  59. /package/dist/cli/templates/provider/{skills → .agents/skills}/upstream-contract-verification/SKILL.md.tpl +0 -0
  60. /package/dist/cli/templates/provider/{skills → .agents/skills}/upstream-notes/README.md.tpl +0 -0
  61. /package/src/cli/templates/provider/{skills → .agents/skills}/fixtures-and-recording/SKILL.md.tpl +0 -0
  62. /package/src/cli/templates/provider/{skills → .agents/skills}/health-checks-and-fail-closed/SKILL.md.tpl +0 -0
  63. /package/src/cli/templates/provider/{skills → .agents/skills}/normalization-standards/SKILL.md.tpl +0 -0
  64. /package/src/cli/templates/provider/{skills → .agents/skills}/pagination-and-counts/SKILL.md.tpl +0 -0
  65. /package/src/cli/templates/provider/{skills → .agents/skills}/upstream-contract-verification/SKILL.md.tpl +0 -0
  66. /package/src/cli/templates/provider/{skills → .agents/skills}/upstream-notes/README.md.tpl +0 -0
@@ -4,8 +4,8 @@ You are building an APIFuse provider. APIFuse turns messy upstream APIs into
4
4
  normalized, typed, evidence-backed public APIs. A provider that merely proxies
5
5
  the upstream is a failed provider, even if every check passes.
6
6
 
7
- This file is the core contract. Detailed procedures live in `skills/` — load
8
- the matching skill BEFORE working on that area (index at the bottom).
7
+ This file is the core contract. Detailed procedures live in `.agents/skills/` —
8
+ load the matching skill BEFORE working on that area (index at the bottom).
9
9
 
10
10
  ## Non-negotiable principles
11
11
 
@@ -75,13 +75,22 @@ bun run submit-check # structural score; a high score does NOT prove quality
75
75
  `submit-check` is a structural gate. Every principle above can be violated
76
76
  while scoring 95/100 — reviewers and CI audit for exactly these classes.
77
77
 
78
+ ## Managed prompt assets
79
+
80
+ `AGENTS.md` and `.agents/skills/**` are generated by the SDK; `CLAUDE.md`,
81
+ `.claude`, and `.codex` are symlinks onto them so every agent CLI reads the
82
+ same contract. Do not hand-edit these files — regenerate them with
83
+ `bun run sync-assets` (or `bunx apifuse sync-assets .`). `apifuse check` and
84
+ `submit-check` enforce a freshness gate: stale or modified prompt assets
85
+ (tracked in `.apifuse/prompt-assets.json`) block submission until re-synced.
86
+
78
87
  ## Skill index — load before working on:
79
88
 
80
89
  | Area | Load |
81
90
  | --- | --- |
82
- | Output schemas, mappers, field naming, timestamps, enums | `skills/normalization-standards/SKILL.md` |
83
- | Upstream request params, new endpoint wiring, field mapping | `skills/upstream-contract-verification/SKILL.md` |
84
- | Recording fixtures, writing tests against fixtures | `skills/fixtures-and-recording/SKILL.md` |
85
- | List operations, paging, totals, client-side filtering | `skills/pagination-and-counts/SKILL.md` |
86
- | healthCheck blocks, error classification, fail-closed guards | `skills/health-checks-and-fail-closed/SKILL.md` |
87
- | Upstream-specific known pitfalls for THIS bounty | `skills/upstream-notes/` (read every file) |
91
+ | Output schemas, mappers, field naming, timestamps, enums | `.agents/skills/normalization-standards/SKILL.md` |
92
+ | Upstream request params, new endpoint wiring, field mapping | `.agents/skills/upstream-contract-verification/SKILL.md` |
93
+ | Recording fixtures, writing tests against fixtures | `.agents/skills/fixtures-and-recording/SKILL.md` |
94
+ | List operations, paging, totals, client-side filtering | `.agents/skills/pagination-and-counts/SKILL.md` |
95
+ | healthCheck blocks, error classification, fail-closed guards | `.agents/skills/health-checks-and-fail-closed/SKILL.md` |
96
+ | Upstream-specific known pitfalls for THIS bounty | `.agents/skills/upstream-notes/` (read every file) |