dsh-openwrite 0.2.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 (275) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +107 -0
  3. package/THIRD_PARTY_NOTICES.md +33 -0
  4. package/assets/logo-dark.svg +31 -0
  5. package/assets/logo-light.svg +31 -0
  6. package/cordis.patch.yml +11 -0
  7. package/docs/BENCHMARK_TASKS.md +54 -0
  8. package/docs/COST_MEASUREMENT.md +39 -0
  9. package/docs/DEVELOPMENT.md +65 -0
  10. package/docs/DSH_STORE.md +58 -0
  11. package/docs/FRAMEWORK_ADVANTAGES.md +288 -0
  12. package/docs/IMPROVEMENT_PLAN.md +252 -0
  13. package/docs/INSTALL.md +99 -0
  14. package/docs/LEARNING.md +68 -0
  15. package/docs/OPEN_SOURCE_NOVEL_AUDIT.md +191 -0
  16. package/docs/PLUGIN_MAINTENANCE.md +54 -0
  17. package/docs/PLUGIN_MAINTENANCE_RC7.md +157 -0
  18. package/docs/QA_20260908.md +103 -0
  19. package/docs/QA_20260909_BENCHMARK.md +24 -0
  20. package/docs/RELEASE_ACCEPTANCE.md +116 -0
  21. package/docs/REVIEW_DAG_FRAMEWORK.md +82 -0
  22. package/docs/TARGETED_NOVEL_PROJECT_REVIEW.md +167 -0
  23. package/docs/WORKFLOWS.md +74 -0
  24. package/docs/WORKSPACE_CONTEXT_CONTRACT.md +125 -0
  25. package/docs/WORKSPACE_INTEGRATION_GOAL.md +278 -0
  26. package/docs/research/autosave-race-repro.mjs +133 -0
  27. package/docs/research/framework-stats-2026-09-05.json +116 -0
  28. package/dog-tools.mjs +11 -0
  29. package/package.json +132 -0
  30. package/packages/openwrite-bridge/LICENSE +201 -0
  31. package/packages/openwrite-bridge/cordis.patch.yml +10 -0
  32. package/packages/openwrite-bridge/lib/client.d.ts +95 -0
  33. package/packages/openwrite-bridge/lib/client.js +193 -0
  34. package/packages/openwrite-bridge/lib/contracts-generated.d.ts +367 -0
  35. package/packages/openwrite-bridge/lib/contracts-generated.js +1764 -0
  36. package/packages/openwrite-bridge/lib/dog-delivery.d.ts +12 -0
  37. package/packages/openwrite-bridge/lib/dog-delivery.js +362 -0
  38. package/packages/openwrite-bridge/lib/dog-review.d.ts +50 -0
  39. package/packages/openwrite-bridge/lib/dog-review.js +470 -0
  40. package/packages/openwrite-bridge/lib/domain.d.ts +70 -0
  41. package/packages/openwrite-bridge/lib/domain.js +496 -0
  42. package/packages/openwrite-bridge/lib/index.d.ts +17 -0
  43. package/packages/openwrite-bridge/lib/index.js +89 -0
  44. package/packages/openwrite-bridge/lib/managed-runtime.d.ts +95 -0
  45. package/packages/openwrite-bridge/lib/managed-runtime.js +510 -0
  46. package/packages/openwrite-bridge/lib/preset-tools.d.ts +13 -0
  47. package/packages/openwrite-bridge/lib/preset-tools.js +18 -0
  48. package/packages/openwrite-bridge/lib/tool-policy.d.ts +6 -0
  49. package/packages/openwrite-bridge/lib/tool-policy.js +56 -0
  50. package/packages/openwrite-bridge/lib/tools.d.ts +24 -0
  51. package/packages/openwrite-bridge/lib/tools.js +2404 -0
  52. package/packages/openwrite-bridge/package.json +67 -0
  53. package/packages/studio-panel/LICENSE +21 -0
  54. package/packages/studio-panel/README.md +51 -0
  55. package/packages/studio-panel/cordis.patch.yml +5 -0
  56. package/packages/studio-panel/lib/client.js +158087 -0
  57. package/packages/studio-panel/lib/client.js.map +1 -0
  58. package/packages/studio-panel/lib/index.js +50 -0
  59. package/packages/studio-panel/lib/types/client/AssetEditor.d.ts +122 -0
  60. package/packages/studio-panel/lib/types/client/AssetsView.d.ts +43 -0
  61. package/packages/studio-panel/lib/types/client/BenchmarkView.d.ts +9 -0
  62. package/packages/studio-panel/lib/types/client/ContinuousReader.d.ts +13 -0
  63. package/packages/studio-panel/lib/types/client/CreationView.d.ts +6 -0
  64. package/packages/studio-panel/lib/types/client/DagCanvas.d.ts +11 -0
  65. package/packages/studio-panel/lib/types/client/DiscardDraftDialog.d.ts +8 -0
  66. package/packages/studio-panel/lib/types/client/DomainToolCard.d.ts +9 -0
  67. package/packages/studio-panel/lib/types/client/GraphView.d.ts +46 -0
  68. package/packages/studio-panel/lib/types/client/HeaderChrome.d.ts +18 -0
  69. package/packages/studio-panel/lib/types/client/LaunchOpenWrite.d.ts +13 -0
  70. package/packages/studio-panel/lib/types/client/LibraryView.d.ts +6 -0
  71. package/packages/studio-panel/lib/types/client/MarkdownText.d.ts +3 -0
  72. package/packages/studio-panel/lib/types/client/ModelView.d.ts +9 -0
  73. package/packages/studio-panel/lib/types/client/OperationsView.d.ts +6 -0
  74. package/packages/studio-panel/lib/types/client/OutlinePlans.d.ts +37 -0
  75. package/packages/studio-panel/lib/types/client/OutlineView.d.ts +29 -0
  76. package/packages/studio-panel/lib/types/client/ResearchView.d.ts +7 -0
  77. package/packages/studio-panel/lib/types/client/ReviewCard.d.ts +28 -0
  78. package/packages/studio-panel/lib/types/client/SceneWorkbench.d.ts +55 -0
  79. package/packages/studio-panel/lib/types/client/SearchView.d.ts +33 -0
  80. package/packages/studio-panel/lib/types/client/TasksView.d.ts +11 -0
  81. package/packages/studio-panel/lib/types/client/TransferWorkspaces.d.ts +19 -0
  82. package/packages/studio-panel/lib/types/client/TurnMutationSummary.d.ts +62 -0
  83. package/packages/studio-panel/lib/types/client/VditorBody.d.ts +55 -0
  84. package/packages/studio-panel/lib/types/client/WorkbenchStore.d.ts +121 -0
  85. package/packages/studio-panel/lib/types/client/api.d.ts +72 -0
  86. package/packages/studio-panel/lib/types/client/asset-drafts.d.ts +20 -0
  87. package/packages/studio-panel/lib/types/client/benchmark-options.d.ts +43 -0
  88. package/packages/studio-panel/lib/types/client/draft-store.d.ts +26 -0
  89. package/packages/studio-panel/lib/types/client/dto.d.ts +517 -0
  90. package/packages/studio-panel/lib/types/client/index.d.ts +4 -0
  91. package/packages/studio-panel/lib/types/client/locales.d.ts +15 -0
  92. package/packages/studio-panel/lib/types/client/manuscript-annotations.d.ts +59 -0
  93. package/packages/studio-panel/lib/types/client/manuscript-markers.d.ts +61 -0
  94. package/packages/studio-panel/lib/types/client/manuscript-mentions.d.ts +30 -0
  95. package/packages/studio-panel/lib/types/client/manuscript-overlay-dom.d.ts +7 -0
  96. package/packages/studio-panel/lib/types/client/manuscript-overlay.d.ts +42 -0
  97. package/packages/studio-panel/lib/types/client/manuscript-selection.d.ts +59 -0
  98. package/packages/studio-panel/lib/types/client/model-view-memory.d.ts +17 -0
  99. package/packages/studio-panel/lib/types/client/storage.d.ts +8 -0
  100. package/packages/studio-panel/lib/types/client/workbench-epochs.d.ts +16 -0
  101. package/packages/studio-panel/lib/types/client/workspace-context.d.ts +52 -0
  102. package/packages/studio-panel/lib/types/client/writing-scope.d.ts +7 -0
  103. package/packages/studio-panel/lib/types/index.d.ts +5 -0
  104. package/packages/studio-panel/package.json +105 -0
  105. package/packages/studio-panel/vendor/vditor/LICENSE +21 -0
  106. package/packages/studio-panel/vendor/vditor/dist/css/content-theme/dark.css +123 -0
  107. package/packages/studio-panel/vendor/vditor/dist/css/content-theme/light.css +101 -0
  108. package/packages/studio-panel/vendor/vditor/dist/index.css +1823 -0
  109. package/packages/studio-panel/vendor/vditor/dist/index.min.js +1 -0
  110. package/packages/studio-panel/vendor/vditor/dist/js/i18n/zh_CN.js +86 -0
  111. package/packages/studio-panel/vendor/vditor/dist/js/icons/ant.js +174 -0
  112. package/packages/studio-panel/vendor/vditor/dist/js/lute/lute.min.js +72 -0
  113. package/plugin.d.ts +3 -0
  114. package/plugin.mjs +80 -0
  115. package/presets/README.md +32 -0
  116. package/presets/openwrite/agent.cordis.yml +317 -0
  117. package/presets/openwrite/preset.yml +3 -0
  118. package/presets/openwrite/skills/canon/SKILL.md +15 -0
  119. package/presets/openwrite/skills/dialoguequality/SKILL.md +166 -0
  120. package/presets/openwrite/skills/dog-delivery-query/SKILL.md +40 -0
  121. package/presets/openwrite/skills/dog-import-query/SKILL.md +27 -0
  122. package/presets/openwrite/skills/dog-review-query/SKILL.md +40 -0
  123. package/presets/openwrite/skills/export-book/SKILL.md +14 -0
  124. package/presets/openwrite/skills/foreshadow/SKILL.md +14 -0
  125. package/presets/openwrite/skills/foreshadowing-system/SKILL.md +125 -0
  126. package/presets/openwrite/skills/learn/SKILL.md +24 -0
  127. package/presets/openwrite/skills/novel-creator/SKILL.md +88 -0
  128. package/presets/openwrite/skills/novel-creator/templates/beat_templates.yaml +179 -0
  129. package/presets/openwrite/skills/novel-creator/templates/example_usage.yaml +74 -0
  130. package/presets/openwrite/skills/novel-reviewer/SKILL.md +85 -0
  131. package/presets/openwrite/skills/oh-story-deslop/LICENSE +21 -0
  132. package/presets/openwrite/skills/oh-story-deslop/SKILL.md +36 -0
  133. package/presets/openwrite/skills/oh-story-deslop/agents/openai.yaml +4 -0
  134. package/presets/openwrite/skills/oh-story-deslop/references/method.md +22 -0
  135. package/presets/openwrite/skills/oh-story-long-analyze/LICENSE +21 -0
  136. package/presets/openwrite/skills/oh-story-long-analyze/SKILL.md +37 -0
  137. package/presets/openwrite/skills/oh-story-long-analyze/agents/openai.yaml +4 -0
  138. package/presets/openwrite/skills/oh-story-long-analyze/references/method.md +22 -0
  139. package/presets/openwrite/skills/oh-story-long-scan/LICENSE +21 -0
  140. package/presets/openwrite/skills/oh-story-long-scan/SKILL.md +36 -0
  141. package/presets/openwrite/skills/oh-story-long-scan/agents/openai.yaml +4 -0
  142. package/presets/openwrite/skills/oh-story-long-scan/references/method.md +21 -0
  143. package/presets/openwrite/skills/oh-story-long-write/LICENSE +21 -0
  144. package/presets/openwrite/skills/oh-story-long-write/SKILL.md +37 -0
  145. package/presets/openwrite/skills/oh-story-long-write/agents/openai.yaml +4 -0
  146. package/presets/openwrite/skills/oh-story-long-write/references/method.md +33 -0
  147. package/presets/openwrite/skills/oh-story-review/LICENSE +21 -0
  148. package/presets/openwrite/skills/oh-story-review/SKILL.md +36 -0
  149. package/presets/openwrite/skills/oh-story-review/agents/openai.yaml +4 -0
  150. package/presets/openwrite/skills/oh-story-review/references/method.md +25 -0
  151. package/presets/openwrite/skills/progress/SKILL.md +16 -0
  152. package/presets/openwrite/skills/review-chapter/SKILL.md +17 -0
  153. package/presets/openwrite/skills/revise-span/SKILL.md +16 -0
  154. package/presets/openwrite/skills/style-system/SKILL.md +135 -0
  155. package/presets/openwrite/skills/style-system/prompts/analyze_style.md +214 -0
  156. package/presets/openwrite/skills/style-system/prompts/batch_extract_style.md +66 -0
  157. package/presets/openwrite/skills/style-system/prompts/compose_style.md +83 -0
  158. package/presets/openwrite/skills/style-system/prompts/extract_style.md +84 -0
  159. package/presets/openwrite/skills/style-system/prompts/initialize_style.md +52 -0
  160. package/presets/openwrite/skills/style-system/templates/analysis_report.yaml +78 -0
  161. package/presets/openwrite/skills/style-system/templates/composed_style.md +96 -0
  162. package/presets/openwrite/skills/style-system/templates/extraction_report.yaml +80 -0
  163. package/presets/openwrite/skills/style-system/templates/fingerprint.yaml +61 -0
  164. package/presets/openwrite/skills/style-system/tools/README.md +33 -0
  165. package/presets/openwrite/skills/truth-validation/SKILL.md +119 -0
  166. package/presets/openwrite/skills/workflow-manager/SKILL.md +81 -0
  167. package/presets/openwrite/skills/world-query/SKILL.md +45 -0
  168. package/presets/openwrite/skills/write-next/SKILL.md +17 -0
  169. package/release/core-requirements.in +12 -0
  170. package/release/licenses/@deepseek-ai__cosmokit@1.8.3/LICENSE +21 -0
  171. package/release/licenses/@deepseek-ai__schemastery@3.18.2/LICENSE +21 -0
  172. package/release/licenses/@isaacs__fs-minipass@4.0.1/LICENSE +15 -0
  173. package/release/licenses/@standard-schema__spec@1.1.0/LICENSE +21 -0
  174. package/release/licenses/@types__d3-color@3.1.3/LICENSE +21 -0
  175. package/release/licenses/@types__d3-drag@3.0.7/LICENSE +21 -0
  176. package/release/licenses/@types__d3-interpolate@3.0.4/LICENSE +21 -0
  177. package/release/licenses/@types__d3-selection@3.0.11/LICENSE +21 -0
  178. package/release/licenses/@types__d3-transition@3.0.9/LICENSE +21 -0
  179. package/release/licenses/@types__d3-zoom@3.0.8/LICENSE +21 -0
  180. package/release/licenses/@xyflow__react@12.11.6/LICENSE +21 -0
  181. package/release/licenses/@xyflow__system@0.0.82/LICENSE +21 -0
  182. package/release/licenses/ajv-formats@3.0.1/LICENSE +21 -0
  183. package/release/licenses/ajv@8.20.0/LICENSE +22 -0
  184. package/release/licenses/chownr@3.0.0/LICENSE.md +63 -0
  185. package/release/licenses/classcat@5.0.5/LICENSE.md +7 -0
  186. package/release/licenses/commander@7.2.0/LICENSE +22 -0
  187. package/release/licenses/d3-array@3.2.4/LICENSE +13 -0
  188. package/release/licenses/d3-axis@3.0.0/LICENSE +13 -0
  189. package/release/licenses/d3-brush@3.0.0/LICENSE +13 -0
  190. package/release/licenses/d3-chord@3.0.1/LICENSE +13 -0
  191. package/release/licenses/d3-color@3.1.0/LICENSE +13 -0
  192. package/release/licenses/d3-contour@4.0.2/LICENSE +13 -0
  193. package/release/licenses/d3-delaunay@6.0.4/LICENSE +14 -0
  194. package/release/licenses/d3-dispatch@3.0.1/LICENSE +13 -0
  195. package/release/licenses/d3-drag@3.0.0/LICENSE +13 -0
  196. package/release/licenses/d3-dsv@3.0.1/LICENSE +13 -0
  197. package/release/licenses/d3-ease@3.0.1/LICENSE +28 -0
  198. package/release/licenses/d3-fetch@3.0.1/LICENSE +13 -0
  199. package/release/licenses/d3-force@3.0.0/LICENSE +13 -0
  200. package/release/licenses/d3-format@3.1.2/LICENSE +13 -0
  201. package/release/licenses/d3-geo@3.1.1/LICENSE +34 -0
  202. package/release/licenses/d3-hierarchy@3.1.2/LICENSE +13 -0
  203. package/release/licenses/d3-interpolate@3.0.1/LICENSE +13 -0
  204. package/release/licenses/d3-path@3.1.0/LICENSE +13 -0
  205. package/release/licenses/d3-polygon@3.0.1/LICENSE +13 -0
  206. package/release/licenses/d3-quadtree@3.0.1/LICENSE +13 -0
  207. package/release/licenses/d3-random@3.0.1/LICENSE +13 -0
  208. package/release/licenses/d3-scale-chromatic@3.1.0/LICENSE +28 -0
  209. package/release/licenses/d3-scale@4.0.2/LICENSE +13 -0
  210. package/release/licenses/d3-selection@3.0.0/LICENSE +13 -0
  211. package/release/licenses/d3-shape@3.2.0/LICENSE +13 -0
  212. package/release/licenses/d3-time-format@4.1.0/LICENSE +13 -0
  213. package/release/licenses/d3-time@3.1.0/LICENSE +13 -0
  214. package/release/licenses/d3-timer@3.0.1/LICENSE +13 -0
  215. package/release/licenses/d3-transition@3.0.1/LICENSE +13 -0
  216. package/release/licenses/d3-zoom@3.0.0/LICENSE +13 -0
  217. package/release/licenses/d3@7.9.0/LICENSE +13 -0
  218. package/release/licenses/delaunator@5.1.0/LICENSE +15 -0
  219. package/release/licenses/elkjs@0.12.0/LICENSE.md +263 -0
  220. package/release/licenses/fast-deep-equal@3.1.3/LICENSE +21 -0
  221. package/release/licenses/fast-uri@3.1.7/LICENSE +30 -0
  222. package/release/licenses/fflate@0.8.2/LICENSE +21 -0
  223. package/release/licenses/graceful-fs@4.2.11/LICENSE +15 -0
  224. package/release/licenses/iconv-lite@0.6.3/LICENSE +21 -0
  225. package/release/licenses/internmap@2.0.3/LICENSE +13 -0
  226. package/release/licenses/json-schema-traverse@1.0.0/LICENSE +21 -0
  227. package/release/licenses/lucide-react@0.468.0/LICENSE +15 -0
  228. package/release/licenses/minipass@7.1.3/LICENSE.md +55 -0
  229. package/release/licenses/minizlib@3.1.0/LICENSE +26 -0
  230. package/release/licenses/proper-lockfile@4.1.2/LICENSE +21 -0
  231. package/release/licenses/require-from-string@2.0.2/license +21 -0
  232. package/release/licenses/retry@0.12.0/License +21 -0
  233. package/release/licenses/robust-predicates@3.0.3/LICENSE +24 -0
  234. package/release/licenses/rw@1.3.3/LICENSE +26 -0
  235. package/release/licenses/safer-buffer@2.1.2/LICENSE +21 -0
  236. package/release/licenses/signal-exit@3.0.7/LICENSE.txt +16 -0
  237. package/release/licenses/tar@7.5.7/LICENSE.md +55 -0
  238. package/release/licenses/use-sync-external-store@1.6.0/LICENSE +21 -0
  239. package/release/licenses/yallist@5.0.0/LICENSE.md +63 -0
  240. package/release/licenses/zustand@4.5.7/LICENSE +21 -0
  241. package/release/openwrite-5.8.1-py3-none-any.whl +0 -0
  242. package/release/platform-overrides.in +5 -0
  243. package/release/python-constraints.in +96 -0
  244. package/release/requirements.lock +2927 -0
  245. package/release/runtime-manifest.json +98 -0
  246. package/release/sdk-compatibility.json +240 -0
  247. package/release/source.json +859 -0
  248. package/release/wheels/cryptography-50.0.1-cp312-abi3-macosx_13_0_x86_64.whl +0 -0
  249. package/release/wheels/licenses/LICENSE.txt +177 -0
  250. package/release/wheels/provenance.json +15 -0
  251. package/scripts/dog/delivery-stage.js +32 -0
  252. package/scripts/dog/import-chapter.js +20 -0
  253. package/scripts/dog/import-record.js +35 -0
  254. package/scripts/dog/review-dimension.js +41 -0
  255. package/scripts/dog/review-record.js +42 -0
  256. package/scripts/maintenance.mjs +179 -0
  257. package/scripts/prepare.mjs +21 -0
  258. package/vendor/dsh-dog/LICENSE +29 -0
  259. package/vendor/dsh-dog/README.md +114 -0
  260. package/vendor/dsh-dog/UPSTREAM.md +22 -0
  261. package/vendor/dsh-dog/cordis.patch.yml +14 -0
  262. package/vendor/dsh-dog/lib/client.js +2898 -0
  263. package/vendor/dsh-dog/lib/client.js.map +1 -0
  264. package/vendor/dsh-dog/lib/core-BiEBMLz3.d.ts +495 -0
  265. package/vendor/dsh-dog/lib/core-DdfMcrB4.js +2074 -0
  266. package/vendor/dsh-dog/lib/core.d.ts +2 -0
  267. package/vendor/dsh-dog/lib/core.js +2 -0
  268. package/vendor/dsh-dog/lib/index.d.ts +133 -0
  269. package/vendor/dsh-dog/lib/index.js +967 -0
  270. package/vendor/dsh-dog/package.json +97 -0
  271. package/vendor/dsh-dog/schemas/schema-0.2/graph.schema.json +139 -0
  272. package/vendor/dsh-dog/schemas/schema-0.2/report.schema.json +87 -0
  273. package/vendor/dsh-dog/schemas/schema-0.2/run.schema.json +259 -0
  274. package/vendor/dsh-dog/schemas/schema-0.2/runtime-event.schema.json +105 -0
  275. package/vendor/dsh-dog/schemas/schema-0.2/verification.schema.json +40 -0
@@ -0,0 +1,193 @@
1
+ /** Header OpenWrite requires on every write request (POST/PUT). */
2
+ const WRITE_HEADER = 'X-OpenWrite-Studio';
3
+ /** HTTP header values are bytes, so Unicode paths need explicit wire encoding.
4
+ * Plain ASCII retains the old contract, including literal percent characters. */
5
+ export function workspaceRootHeaders(root, lowercase = false) {
6
+ const name = lowercase ? 'x-openwrite-workspace-root' : 'X-OpenWrite-Workspace-Root';
7
+ return /[^\x20-\x7e]/.test(root)
8
+ ? { [name]: encodeURIComponent(root), [name + (lowercase ? '-encoding' : '-Encoding')]: 'uri' }
9
+ : { [name]: root };
10
+ }
11
+ /** A normalized Studio failure: HTTP status plus the server's machine-readable code. */
12
+ export class StudioError extends Error {
13
+ status;
14
+ code;
15
+ details;
16
+ constructor(message, status, code, details = null) {
17
+ super(message);
18
+ this.name = 'StudioError';
19
+ this.status = status;
20
+ this.code = code;
21
+ this.details = details;
22
+ }
23
+ }
24
+ /** Narrow `JSON.parse` output to the JsonValue union without `any`. */
25
+ function asJson(value) {
26
+ // Studio only ever sends JSON; unrepresentable values degrade to null rather
27
+ // than leaking an untyped `any` into tool output.
28
+ return (value === undefined ? null : value);
29
+ }
30
+ /** Parse a `Content-Disposition: attachment; filename*=UTF-8''...` header. */
31
+ function parseDispositionFilename(header) {
32
+ if (header === null)
33
+ return undefined;
34
+ const encoded = /filename\*=UTF-8''([^;]+)/i.exec(header);
35
+ if (encoded?.[1] !== undefined) {
36
+ try {
37
+ return decodeURIComponent(encoded[1]);
38
+ }
39
+ catch {
40
+ // Malformed percent-encoding: fall through to the plain filename form.
41
+ }
42
+ }
43
+ const plain = /filename="?([^";]+)"?/i.exec(header);
44
+ return plain?.[1];
45
+ }
46
+ /** Set query params on a URL, expanding array values into repeated entries. */
47
+ function applyParams(url, params) {
48
+ for (const [key, value] of Object.entries(params)) {
49
+ if (Array.isArray(value)) {
50
+ for (const item of value)
51
+ url.searchParams.append(key, item);
52
+ }
53
+ else {
54
+ url.searchParams.set(key, value);
55
+ }
56
+ }
57
+ }
58
+ export class StudioClient {
59
+ connect;
60
+ baseUrl;
61
+ timeoutMs;
62
+ onMutation;
63
+ /** Workspace context stamped onto every request; undefined for legacy (unscoped) clients. */
64
+ context;
65
+ constructor(options) {
66
+ this.connect = options.connect;
67
+ this.baseUrl = options.baseUrl.replace(/\/+$/, '');
68
+ this.timeoutMs = options.timeoutMs;
69
+ this.onMutation = options.onMutation;
70
+ this.context = options.context;
71
+ }
72
+ /**
73
+ * Derive a lightweight request-scoped client sharing baseUrl/timeout/onMutation.
74
+ * Every request it makes carries the §3 context headers, and mutation
75
+ * notifications report this context so invalidation stays per-root.
76
+ */
77
+ scoped(context) {
78
+ return new StudioClient({ connect: this.connect, baseUrl: this.baseUrl, timeoutMs: this.timeoutMs, onMutation: this.onMutation, context });
79
+ }
80
+ /** §3 context headers; empty for a legacy (unscoped) client. */
81
+ contextHeaders() {
82
+ const context = this.context;
83
+ if (context === undefined)
84
+ return {};
85
+ const headers = workspaceRootHeaders(context.workspaceRoot);
86
+ if (context.workspaceId !== undefined)
87
+ headers['X-OpenWrite-Workspace-Id'] = context.workspaceId;
88
+ if (context.sessionId !== undefined)
89
+ headers['X-OpenWrite-Session-Id'] = context.sessionId;
90
+ if (context.contextEpoch !== undefined)
91
+ headers['X-OpenWrite-Context-Epoch'] = String(context.contextEpoch);
92
+ if (context.toolCallId !== undefined)
93
+ headers['X-OpenWrite-Tool-Call-Id'] = context.toolCallId;
94
+ if (context.rootCallId !== undefined)
95
+ headers['X-OpenWrite-Root-Call-Id'] = context.rootCallId;
96
+ if (context.toolName !== undefined)
97
+ headers['X-OpenWrite-Tool-Name'] = context.toolName;
98
+ return headers;
99
+ }
100
+ /** GET a JSON endpoint. `params` entries are URL-encoded; undefined values are dropped. */
101
+ async getJson(path, params = {}, signal) {
102
+ const url = new URL(`${this.baseUrl}${path}`);
103
+ applyParams(url, params);
104
+ const response = await this.request(url, { method: 'GET', headers: this.contextHeaders() }, signal);
105
+ return this.readJson(response);
106
+ }
107
+ /** POST a JSON object with the Studio write protocol header. */
108
+ async postJson(path, body, signal) {
109
+ const response = await this.request(new URL(`${this.baseUrl}${path}`), {
110
+ method: 'POST',
111
+ headers: { [WRITE_HEADER]: '1', ...this.contextHeaders(), 'Content-Type': 'application/json' },
112
+ body: JSON.stringify(body),
113
+ }, signal);
114
+ const result = await this.readJson(response);
115
+ this.onMutation?.(path, this.context);
116
+ return result;
117
+ }
118
+ /** PUT a JSON object with the Studio write protocol header. */
119
+ async putJson(path, body, signal) {
120
+ const response = await this.request(new URL(`${this.baseUrl}${path}`), {
121
+ method: 'PUT',
122
+ headers: { [WRITE_HEADER]: '1', ...this.contextHeaders(), 'Content-Type': 'application/json' },
123
+ body: JSON.stringify(body),
124
+ }, signal);
125
+ const result = await this.readJson(response);
126
+ this.onMutation?.(path, this.context);
127
+ return result;
128
+ }
129
+ /** GET a file-download endpoint (export), returning the raw bytes and filename. */
130
+ async download(path, params, signal) {
131
+ const url = new URL(`${this.baseUrl}${path}`);
132
+ applyParams(url, params);
133
+ const response = await this.request(url, { method: 'GET', headers: this.contextHeaders() }, signal);
134
+ if (!response.ok) {
135
+ // Error downloads are still JSON payloads.
136
+ await this.readJson(response);
137
+ }
138
+ const content = new Uint8Array(await response.arrayBuffer());
139
+ return {
140
+ filename: parseDispositionFilename(response.headers.get('content-disposition')) ?? 'export.bin',
141
+ contentType: response.headers.get('content-type') ?? 'application/octet-stream',
142
+ content,
143
+ };
144
+ }
145
+ /** One fetch honoring both the caller's abort signal and the configured timeout. */
146
+ async request(url, init, signal) {
147
+ const signals = [AbortSignal.timeout(this.timeoutMs)];
148
+ if (signal !== undefined)
149
+ signals.push(signal);
150
+ try {
151
+ const connection = await this.connect?.();
152
+ const target = connection ? new URL(url.pathname + url.search, connection.baseUrl) : url;
153
+ const headers = connection?.token ? { ...init.headers, Authorization: `Bearer ${connection.token}` } : init.headers;
154
+ return await fetch(target, { ...init, headers, signal: AbortSignal.any(signals) });
155
+ }
156
+ catch (error) {
157
+ if (signal?.aborted)
158
+ throw error;
159
+ throw new StudioError(`Studio request failed: ${error instanceof Error ? error.message : String(error)}`, 0, 'NETWORK_ERROR');
160
+ }
161
+ }
162
+ /**
163
+ * Read a JSON response, throwing a normalized StudioError for non-2xx statuses
164
+ * and for bodies carrying the server's `{error, code}` contract. Success
165
+ * envelopes (`{ok: true, data}`) are unwrapped to their `data` payload.
166
+ */
167
+ async readJson(response) {
168
+ let parsed;
169
+ try {
170
+ parsed = await response.json();
171
+ }
172
+ catch {
173
+ throw new StudioError(`Studio returned HTTP ${response.status} with a non-JSON body`, response.status, 'INVALID_RESPONSE');
174
+ }
175
+ const body = asJson(parsed);
176
+ if (typeof body === 'object' && body !== null && !Array.isArray(body)) {
177
+ const error = body['error'];
178
+ if (typeof error === 'string' && error.length > 0) {
179
+ const code = typeof body['code'] === 'string' ? body['code'] : 'STUDIO_ERROR';
180
+ const details = 'details' in body ? body['details'] : null;
181
+ throw new StudioError(error, response.status, code, details);
182
+ }
183
+ // HTTP status remains authoritative even when a proxy or incompatible
184
+ // server sends a success-shaped envelope with an error status.
185
+ if (response.ok && body['ok'] === true && 'data' in body)
186
+ return body['data'];
187
+ }
188
+ if (!response.ok) {
189
+ throw new StudioError(`Studio returned HTTP ${response.status}`, response.status, 'HTTP_ERROR');
190
+ }
191
+ return body;
192
+ }
193
+ }
@@ -0,0 +1,367 @@
1
+ /** OpenWrite review v2 decision. Extra keys are allowed (additionalProperties). */
2
+ export interface ReviewV2Decision {
3
+ schema_version: "openwrite.review.v2";
4
+ execution_status: "completed" | "partial" | "failed";
5
+ quality_score: number | null;
6
+ coverage: number;
7
+ gate_status: "pass" | "blocked" | "inconclusive";
8
+ delivery_status: "pass" | "revise" | "blocked" | "inconclusive" | "stale";
9
+ production_gate_status: "pass" | "revise" | "blocked" | "inconclusive" | "stale" | "disabled" | "disabled_uncalibrated";
10
+ [key: string]: unknown;
11
+ }
12
+ /** dsh-novel review manifest v2. Extra keys are allowed (additionalProperties). */
13
+ export interface ReviewManifestV2 {
14
+ schemaVersion: "dsh-novel.review.manifest.v2";
15
+ recordType: "review";
16
+ chapterId: string;
17
+ verdict: "pass" | "fail" | "inconclusive";
18
+ decisionSource?: "v2" | "v1-adapter";
19
+ threshold?: number;
20
+ coverage?: number;
21
+ qualityScore?: number | null;
22
+ [key: string]: unknown;
23
+ }
24
+ /** DeliveryManifestV2Stage. Extra keys are allowed (additionalProperties). */
25
+ export interface DeliveryManifestV2Stage {
26
+ schemaVersion: "dsh-novel.delivery.stage.v2";
27
+ recordType: "delivery-stage";
28
+ chapterId: string;
29
+ stage: string;
30
+ verdict: "pass" | "fail" | "inconclusive";
31
+ status: string;
32
+ evidence: Record<string, unknown>;
33
+ [key: string]: unknown;
34
+ }
35
+ /** dsh-novel delivery manifest v2. Extra keys are allowed (additionalProperties). */
36
+ export interface DeliveryManifestV2 {
37
+ schemaVersion: "dsh-novel.delivery.manifest.v2";
38
+ recordType: "chapter-delivery";
39
+ chapterId: string;
40
+ novelId?: string;
41
+ threshold?: number;
42
+ decisionSource?: "v2" | "v1-adapter";
43
+ readyForDelivery?: boolean;
44
+ stages: Record<string, DeliveryManifestV2Stage>;
45
+ [key: string]: unknown;
46
+ }
47
+ /** dsh-novel delivery stage v2. Extra keys are allowed (additionalProperties). */
48
+ export interface DeliveryStageV2 {
49
+ schemaVersion: "dsh-novel.delivery.stage.v2";
50
+ recordType: "delivery-stage";
51
+ chapterId: string;
52
+ stage: string;
53
+ verdict: "pass" | "fail" | "inconclusive";
54
+ status: string;
55
+ evidence: Record<string, unknown>;
56
+ [key: string]: unknown;
57
+ }
58
+ /** ModelBenchmarkV1CandidateUsage. Extra keys are allowed (additionalProperties). */
59
+ export interface ModelBenchmarkV1CandidateUsage {
60
+ prompt_tokens?: number | null;
61
+ completion_tokens?: number | null;
62
+ reasoning_tokens?: number | null;
63
+ total_tokens?: number | null;
64
+ [key: string]: unknown;
65
+ }
66
+ /** ModelBenchmarkV1CandidateError. Extra keys are allowed (additionalProperties). */
67
+ export interface ModelBenchmarkV1CandidateError {
68
+ code: string;
69
+ message: string;
70
+ [key: string]: unknown;
71
+ }
72
+ /** ModelBenchmarkV1Candidate. Extra keys are allowed (additionalProperties). */
73
+ export interface ModelBenchmarkV1Candidate {
74
+ candidate_id: string;
75
+ writer_profile: Record<string, unknown>;
76
+ reliability_status: "completed" | "failed";
77
+ usage?: ModelBenchmarkV1CandidateUsage | null;
78
+ cost_usd?: number | null;
79
+ cost_reported?: boolean;
80
+ latency_ms?: number | null;
81
+ error?: ModelBenchmarkV1CandidateError | null;
82
+ task_type?: "chapter" | "outline";
83
+ outline_start_chapter?: number;
84
+ outline_end_chapter?: number;
85
+ outline_chapter_count?: number;
86
+ outline_chapters?: Record<string, unknown>[];
87
+ [key: string]: unknown;
88
+ }
89
+ /** ModelBenchmarkV1EvaluationUsage. Extra keys are allowed (additionalProperties). */
90
+ export interface ModelBenchmarkV1EvaluationUsage {
91
+ prompt_tokens?: number | null;
92
+ completion_tokens?: number | null;
93
+ reasoning_tokens?: number | null;
94
+ total_tokens?: number | null;
95
+ [key: string]: unknown;
96
+ }
97
+ /** ModelBenchmarkV1EvaluationError. Extra keys are allowed (additionalProperties). */
98
+ export interface ModelBenchmarkV1EvaluationError {
99
+ code: string;
100
+ message: string;
101
+ [key: string]: unknown;
102
+ }
103
+ /** ModelBenchmarkV1Evaluation. Extra keys are allowed (additionalProperties). */
104
+ export interface ModelBenchmarkV1Evaluation {
105
+ candidate_id: string;
106
+ reviewer_profile: Record<string, unknown>;
107
+ execution_status: "completed" | "partial" | "failed";
108
+ usage?: ModelBenchmarkV1EvaluationUsage | null;
109
+ cost_usd?: number | null;
110
+ cost_reported?: boolean;
111
+ latency_ms?: number | null;
112
+ error?: ModelBenchmarkV1EvaluationError | null;
113
+ [key: string]: unknown;
114
+ }
115
+ /** ModelBenchmarkV1ConfigPipelineNode. Extra keys are allowed (additionalProperties). */
116
+ export interface ModelBenchmarkV1ConfigPipelineNode {
117
+ id: string;
118
+ label: string;
119
+ depends_on: string[];
120
+ }
121
+ /** ModelBenchmarkV1ConfigPipelineReviewDomain. Extra keys are allowed (additionalProperties). */
122
+ export interface ModelBenchmarkV1ConfigPipelineReviewDomain {
123
+ id?: string;
124
+ label?: string;
125
+ }
126
+ /** ModelBenchmarkV1ConfigPipeline. Extra keys are allowed (additionalProperties). */
127
+ export interface ModelBenchmarkV1ConfigPipeline {
128
+ id?: string;
129
+ execution_mode?: "framework" | "creative";
130
+ nodes?: ModelBenchmarkV1ConfigPipelineNode[];
131
+ review_domains?: ModelBenchmarkV1ConfigPipelineReviewDomain[];
132
+ }
133
+ /** ModelBenchmarkV1Config. Extra keys are allowed (additionalProperties). */
134
+ export interface ModelBenchmarkV1Config {
135
+ writer_profile_ids: string[];
136
+ reviewer_profile_ids: string[];
137
+ repeats?: number;
138
+ target_words?: number;
139
+ concurrency?: number;
140
+ blind_review?: boolean;
141
+ run_scoped_profiles?: boolean;
142
+ execution_mode?: "framework" | "creative";
143
+ task_type?: "chapter" | "outline";
144
+ outline_start_chapter?: number;
145
+ outline_end_chapter?: number;
146
+ outline_chapter_count?: number;
147
+ pipeline?: ModelBenchmarkV1ConfigPipeline;
148
+ [key: string]: unknown;
149
+ }
150
+ /** ModelBenchmarkV1Summary. Extra keys are allowed (additionalProperties). */
151
+ export interface ModelBenchmarkV1Summary {
152
+ latency_ms_total?: number | null;
153
+ failed_candidates?: number;
154
+ [key: string]: unknown;
155
+ }
156
+ /** OpenWrite model benchmark v1 artifact. Extra keys are allowed (additionalProperties). */
157
+ export interface ModelBenchmarkV1 {
158
+ schema_version: "openwrite.model-benchmark.v1";
159
+ run_id: string;
160
+ status: "completed" | "partial" | "failed";
161
+ context_hash: string;
162
+ task_id?: string;
163
+ started_at?: string;
164
+ candidates: ModelBenchmarkV1Candidate[];
165
+ evaluations: ModelBenchmarkV1Evaluation[];
166
+ config: ModelBenchmarkV1Config;
167
+ summary?: ModelBenchmarkV1Summary;
168
+ task_type?: "chapter" | "outline";
169
+ [key: string]: unknown;
170
+ }
171
+ /** OpenWrite independent chat and embedding model surface v1. Extra keys are allowed (additionalProperties). */
172
+ export interface ModelProfileSurfaceV1 {
173
+ schema_version: "openwrite.model-profile.v1";
174
+ default_profile_id: string;
175
+ active_embedding_profile_id: string;
176
+ profiles: unknown[];
177
+ embedding_profiles: unknown[];
178
+ routes: Record<string, string>;
179
+ [key: string]: unknown;
180
+ }
181
+ /** TaskSurfaceV1TaskProgress. Extra keys are allowed (additionalProperties). */
182
+ export interface TaskSurfaceV1TaskProgress {
183
+ completed_units: number;
184
+ total_units: number;
185
+ ratio: number | null;
186
+ unit_kind: "candidates" | "evaluations" | "chapters" | "files";
187
+ [key: string]: unknown;
188
+ }
189
+ /** TaskSurfaceV1TaskError. Extra keys are allowed (additionalProperties). */
190
+ export interface TaskSurfaceV1TaskError {
191
+ code: string;
192
+ message: string;
193
+ recoverable: boolean;
194
+ failed_stage?: string | null;
195
+ [key: string]: unknown;
196
+ }
197
+ /** TaskSurfaceV1TaskResultRef. Extra keys are allowed (additionalProperties). */
198
+ export interface TaskSurfaceV1TaskResultRef {
199
+ type: "chapter" | "review" | "revision" | "research_report" | "benchmark_run" | "import" | "archive";
200
+ id: string;
201
+ [key: string]: unknown;
202
+ }
203
+ /** TaskSurfaceV1Task. Extra keys are allowed (additionalProperties). */
204
+ export interface TaskSurfaceV1Task {
205
+ task_id: string;
206
+ type: string;
207
+ status: "pending" | "running" | "awaiting_confirmation" | "completed" | "failed" | "cancelled" | "interrupted";
208
+ phase: "queued" | "reading" | "preparing" | "model" | "validating" | "committing" | "complete" | null;
209
+ phase_index: number | null;
210
+ progress: TaskSurfaceV1TaskProgress | null;
211
+ attempt: number;
212
+ retryable: boolean;
213
+ created_at: string | null;
214
+ updated_at: string | null;
215
+ started_at: string | null;
216
+ completed_at: string | null;
217
+ error: TaskSurfaceV1TaskError | null;
218
+ result_ref: TaskSurfaceV1TaskResultRef | null;
219
+ input_summary: string | null;
220
+ chapter_id: string | null;
221
+ schema_version: string;
222
+ [key: string]: unknown;
223
+ }
224
+ /** OpenWrite task surface v1 (credential-free). Extra keys are allowed (additionalProperties). */
225
+ export interface TaskSurfaceV1 {
226
+ schema_version: "openwrite.task-surface.v1";
227
+ phase_order: "queued" | "reading" | "preparing" | "model" | "validating" | "committing" | "complete"[];
228
+ tasks: TaskSurfaceV1Task[];
229
+ counts: Record<string, unknown>;
230
+ [key: string]: unknown;
231
+ }
232
+ /** ResearchSurfaceV1SettingsSearchProvider. Extra keys are allowed (additionalProperties). */
233
+ export interface ResearchSurfaceV1SettingsSearchProvider {
234
+ id: "bocha" | "bing" | "jina" | "none";
235
+ label: string;
236
+ requires_api_key: boolean;
237
+ configured: boolean;
238
+ credential_configured: boolean;
239
+ [key: string]: unknown;
240
+ }
241
+ /** ResearchSurfaceV1Settings. Extra keys are allowed (additionalProperties). */
242
+ export interface ResearchSurfaceV1Settings {
243
+ search_provider: "bocha" | "bing" | "jina" | "none";
244
+ search_providers: ResearchSurfaceV1SettingsSearchProvider[];
245
+ [key: string]: unknown;
246
+ }
247
+ /** ResearchSurfaceV1ReportModelProfile. Extra keys are allowed (additionalProperties). */
248
+ export interface ResearchSurfaceV1ReportModelProfile {
249
+ id: string | null;
250
+ label: string | null;
251
+ model: string | null;
252
+ provider: string | null;
253
+ [key: string]: unknown;
254
+ }
255
+ /** ResearchSurfaceV1ReportSource. Extra keys are allowed (additionalProperties). */
256
+ export interface ResearchSurfaceV1ReportSource {
257
+ title: string;
258
+ url: string;
259
+ source_type: string;
260
+ cited: boolean;
261
+ [key: string]: unknown;
262
+ }
263
+ /** ResearchSurfaceV1ReportUsage. Extra keys are allowed (additionalProperties). */
264
+ export interface ResearchSurfaceV1ReportUsage {
265
+ total_tokens: number | null;
266
+ reported: boolean;
267
+ [key: string]: unknown;
268
+ }
269
+ /** ResearchSurfaceV1ReportCostUsd. Extra keys are allowed (additionalProperties). */
270
+ export interface ResearchSurfaceV1ReportCostUsd {
271
+ value: number | null;
272
+ reported: boolean;
273
+ [key: string]: unknown;
274
+ }
275
+ /** ResearchSurfaceV1ReportFailure. Extra keys are allowed (additionalProperties). */
276
+ export interface ResearchSurfaceV1ReportFailure {
277
+ code: string;
278
+ message: string;
279
+ [key: string]: unknown;
280
+ }
281
+ /** ResearchSurfaceV1Report. Extra keys are allowed (additionalProperties). */
282
+ export interface ResearchSurfaceV1Report {
283
+ id: string;
284
+ title: string;
285
+ status: "succeeded" | "failed" | "needs_human_review" | "unknown";
286
+ episode_id: string | null;
287
+ task_id: string | null;
288
+ created_at: string | null;
289
+ completed_at: string | null;
290
+ model_profile: ResearchSurfaceV1ReportModelProfile | null;
291
+ search_provider: string | null;
292
+ sources: ResearchSurfaceV1ReportSource[] | null;
293
+ sources_status: "ok" | "unavailable";
294
+ source_count: number | null;
295
+ word_count: number | null;
296
+ latency_ms: number | null;
297
+ usage: ResearchSurfaceV1ReportUsage;
298
+ cost_usd: ResearchSurfaceV1ReportCostUsd;
299
+ failure: ResearchSurfaceV1ReportFailure | null;
300
+ metrics: Record<string, unknown>;
301
+ path: string;
302
+ bytes: number;
303
+ [key: string]: unknown;
304
+ }
305
+ /** ResearchSurfaceV1ModelRoute. Extra keys are allowed (additionalProperties). */
306
+ export interface ResearchSurfaceV1ModelRoute {
307
+ profile_id: string;
308
+ label: string;
309
+ model: string;
310
+ provider: string;
311
+ configured: boolean;
312
+ compatible: boolean;
313
+ [key: string]: unknown;
314
+ }
315
+ /** OpenWrite research surface v1 (credential-free). Extra keys are allowed (additionalProperties). */
316
+ export interface ResearchSurfaceV1 {
317
+ schema_version: "openwrite.research-surface.v1";
318
+ available: boolean;
319
+ node_ready: boolean;
320
+ pnpm_ready: boolean;
321
+ package_ready: boolean;
322
+ dependencies_ready: boolean;
323
+ setup_hint: string;
324
+ settings: ResearchSurfaceV1Settings;
325
+ reports: ResearchSurfaceV1Report[];
326
+ model_route: ResearchSurfaceV1ModelRoute;
327
+ [key: string]: unknown;
328
+ }
329
+ /** OpenWrite model connection test v1 success payload (chat and embedding variants). Extra keys are allowed (additionalProperties). */
330
+ export interface ModelConnectionTestV1 {
331
+ ok: true;
332
+ status: "ok";
333
+ provider: string;
334
+ model: string;
335
+ latency_ms: number;
336
+ tested_at: string;
337
+ reply?: string;
338
+ provider_label?: string;
339
+ dimension?: number;
340
+ max_tokens?: number;
341
+ base_url?: string;
342
+ vectors?: number;
343
+ [key: string]: unknown;
344
+ }
345
+ type SchemaMap = Record<string, unknown>;
346
+ /** Minimal JSON Schema subset validator mirroring OpenWrite
347
+ * `tools/schema_lint.py` and `scripts/schema-lint.mjs`. */
348
+ export declare function validateSchema(value: unknown, schema: SchemaMap, path?: string, root?: SchemaMap): string[];
349
+ /** Validate `value` against the review_v2_decision schema; throw on failure. */
350
+ export declare function validateReviewV2Decision(value: unknown): ReviewV2Decision;
351
+ /** Validate `value` against the review_manifest_v2 schema; throw on failure. */
352
+ export declare function validateReviewManifestV2(value: unknown): ReviewManifestV2;
353
+ /** Validate `value` against the delivery_manifest_v2 schema; throw on failure. */
354
+ export declare function validateDeliveryManifestV2(value: unknown): DeliveryManifestV2;
355
+ /** Validate `value` against the delivery_stage_v2 schema; throw on failure. */
356
+ export declare function validateDeliveryStageV2(value: unknown): DeliveryStageV2;
357
+ /** Validate `value` against the model_benchmark_v1 schema; throw on failure. */
358
+ export declare function validateModelBenchmarkV1(value: unknown): ModelBenchmarkV1;
359
+ /** Validate `value` against the model_profile_surface_v1 schema; throw on failure. */
360
+ export declare function validateModelProfileSurfaceV1(value: unknown): ModelProfileSurfaceV1;
361
+ /** Validate `value` against the task_surface_v1 schema; throw on failure. */
362
+ export declare function validateTaskSurfaceV1(value: unknown): TaskSurfaceV1;
363
+ /** Validate `value` against the research_surface_v1 schema; throw on failure. */
364
+ export declare function validateResearchSurfaceV1(value: unknown): ResearchSurfaceV1;
365
+ /** Validate `value` against the model_connection_test_v1 schema; throw on failure. */
366
+ export declare function validateModelConnectionTestV1(value: unknown): ModelConnectionTestV1;
367
+ export {};