@labelbox/recursion-sdk 0.0.0 → 0.0.154

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 (60) hide show
  1. package/README.md +90 -1
  2. package/dist/client-options.d.ts +39 -0
  3. package/dist/client-options.js +29 -0
  4. package/dist/generated/client/client.gen.d.ts +2 -0
  5. package/dist/generated/client/client.gen.js +216 -0
  6. package/dist/generated/client/index.d.ts +8 -0
  7. package/dist/generated/client/index.js +6 -0
  8. package/dist/generated/client/types.gen.d.ts +120 -0
  9. package/dist/generated/client/types.gen.js +2 -0
  10. package/dist/generated/client/utils.gen.d.ts +37 -0
  11. package/dist/generated/client/utils.gen.js +228 -0
  12. package/dist/generated/client.gen.d.ts +12 -0
  13. package/dist/generated/client.gen.js +3 -0
  14. package/dist/generated/core/auth.gen.d.ts +18 -0
  15. package/dist/generated/core/auth.gen.js +14 -0
  16. package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
  17. package/dist/generated/core/bodySerializer.gen.js +57 -0
  18. package/dist/generated/core/params.gen.d.ts +43 -0
  19. package/dist/generated/core/params.gen.js +100 -0
  20. package/dist/generated/core/pathSerializer.gen.d.ts +33 -0
  21. package/dist/generated/core/pathSerializer.gen.js +106 -0
  22. package/dist/generated/core/queryKeySerializer.gen.d.ts +18 -0
  23. package/dist/generated/core/queryKeySerializer.gen.js +92 -0
  24. package/dist/generated/core/serverSentEvents.gen.d.ts +71 -0
  25. package/dist/generated/core/serverSentEvents.gen.js +132 -0
  26. package/dist/generated/core/types.gen.d.ts +78 -0
  27. package/dist/generated/core/types.gen.js +2 -0
  28. package/dist/generated/core/utils.gen.d.ts +19 -0
  29. package/dist/generated/core/utils.gen.js +87 -0
  30. package/dist/generated/index.d.ts +2 -0
  31. package/dist/generated/index.js +2 -0
  32. package/dist/generated/sdk.gen.d.ts +3108 -0
  33. package/dist/generated/sdk.gen.js +6103 -0
  34. package/dist/generated/types.gen.d.ts +40456 -0
  35. package/dist/generated/types.gen.js +2 -0
  36. package/dist/index.d.ts +21 -0
  37. package/dist/index.js +39 -0
  38. package/dist/nesting.d.ts +18 -0
  39. package/dist/nesting.js +75 -0
  40. package/dist/reference/concepts.d.ts +15 -0
  41. package/dist/reference/concepts.js +354 -0
  42. package/dist/reference/domains.d.ts +65 -0
  43. package/dist/reference/domains.js +32 -0
  44. package/dist/reference/recipes-reference.generated.d.ts +11 -0
  45. package/dist/reference/recipes-reference.generated.js +11415 -0
  46. package/dist/reference/recipes-schema.d.ts +676 -0
  47. package/dist/reference/recipes-schema.js +406 -0
  48. package/dist/reference/resources-reference.generated.d.ts +11 -0
  49. package/dist/reference/resources-reference.generated.js +7257 -0
  50. package/dist/reference/resources-schema.d.ts +78 -0
  51. package/dist/reference/resources-schema.js +71 -0
  52. package/dist/reference/schema.d.ts +153 -0
  53. package/dist/reference/schema.js +151 -0
  54. package/dist/reference/sdk-reference.generated.d.ts +10 -0
  55. package/dist/reference/sdk-reference.generated.js +68480 -0
  56. package/dist/reference/tutorials.d.ts +76 -0
  57. package/dist/reference/tutorials.js +65 -0
  58. package/dist/session-events.d.ts +92 -0
  59. package/dist/session-events.js +213 -0
  60. package/package.json +123 -8
@@ -0,0 +1,2 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export {};
@@ -0,0 +1,21 @@
1
+ import { type RecursionClientOptions } from './client-options.js';
2
+ import { Recursion } from './generated/sdk.gen.js';
3
+ export { DEFAULT_BASE_URL, type RecursionClientOptions } from './client-options.js';
4
+ export * from './generated/index.js';
5
+ /**
6
+ * Server-sent events are the one managed-agents response shape the generated
7
+ * client cannot carry, so the session event stream is hand-written. See
8
+ * `session-events.ts` for why it is not generated.
9
+ */
10
+ export { ManagedAgentSessionStreamError, type ManagedAgentSessionStreamEvent, type ManagedAgentSessionStreamParams, streamManagedAgentSessionEvents, } from './session-events.js';
11
+ /**
12
+ * Construct an authenticated `Recursion` client.
13
+ *
14
+ * @example
15
+ * const rl = createRecursionClient({ apiKey: process.env.LABELBOX_API_KEY! });
16
+ * const job = await rl.synthesizers.create({
17
+ * environmentId: 'env_abc',
18
+ * body: { name: 'Variant generator', systemPrompt: '…', runConfigVersionId: 'rcv_…' },
19
+ * });
20
+ */
21
+ export declare function createRecursionClient(options: RecursionClientOptions): Recursion;
package/dist/index.js ADDED
@@ -0,0 +1,39 @@
1
+ // Public entry point for the rl-gym TypeScript SDK.
2
+ //
3
+ // The `Recursion` class and every namespace/method on it, plus the request/response
4
+ // types, are generated from the backend OpenAPI spec by `@hey-api/openapi-ts`
5
+ // (see `openapi-ts.config.ts`). This file is the only hand-written surface: it
6
+ // re-exports the generated client and adds a small constructor that wires auth +
7
+ // base URL. It does not grow as operations are added.
8
+ import { DEFAULT_BASE_URL } from './client-options.js';
9
+ import { createClient, createConfig } from './generated/client/index.js';
10
+ import { Recursion } from './generated/sdk.gen.js';
11
+ export { DEFAULT_BASE_URL } from './client-options.js';
12
+ export * from './generated/index.js';
13
+ /**
14
+ * Server-sent events are the one managed-agents response shape the generated
15
+ * client cannot carry, so the session event stream is hand-written. See
16
+ * `session-events.ts` for why it is not generated.
17
+ */
18
+ export { ManagedAgentSessionStreamError, streamManagedAgentSessionEvents, } from './session-events.js';
19
+ /**
20
+ * Construct an authenticated `Recursion` client.
21
+ *
22
+ * @example
23
+ * const rl = createRecursionClient({ apiKey: process.env.LABELBOX_API_KEY! });
24
+ * const job = await rl.synthesizers.create({
25
+ * environmentId: 'env_abc',
26
+ * body: { name: 'Variant generator', systemPrompt: '…', runConfigVersionId: 'rcv_…' },
27
+ * });
28
+ */
29
+ export function createRecursionClient(options) {
30
+ const client = createClient(createConfig({
31
+ baseUrl: options.baseUrl ?? DEFAULT_BASE_URL,
32
+ // Surface non-2xx responses as thrown errors so callers can use plain
33
+ // `await` + try/catch instead of inspecting an error field.
34
+ throwOnError: true,
35
+ // biome-ignore lint/style/useNamingConvention: HTTP header names are not camelCase.
36
+ headers: { ...options.headers, Authorization: `Bearer ${options.apiKey}` },
37
+ }));
38
+ return new Recursion({ client });
39
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * camelCase → kebab-case. Shared by the CLI (command + flag names) and the
3
+ * reference-doc generator (CLI example flags) so both spell names identically.
4
+ */
5
+ export declare function kebab(value: string): string;
6
+ /**
7
+ * Validate the declared SDK paths: every segment must be a camelCase identifier
8
+ * and no two operations may share the same path. Throws on the first problem —
9
+ * a codegen-time guard against malformed or shadowing routes.
10
+ */
11
+ export declare function validateSdkPaths(pathsByOperationId: Map<string, string[]>): void;
12
+ /**
13
+ * Scan a parsed OpenAPI spec for opted-in operations and return their declared
14
+ * SDK call paths keyed by operationId. An operation is opted in iff it carries
15
+ * an `x-sdk-path` array (emitted by the backend `@SdkRoute(...)` decorator). The
16
+ * collected paths are validated (unique, valid segments) before returning.
17
+ */
18
+ export declare function collectSdkPaths(spec: unknown): Map<string, string[]>;
@@ -0,0 +1,75 @@
1
+ // The SDK/CLI surface is declared at the source: each backend handler that
2
+ // should be generated carries `@SdkRoute(...segments)`, which emits an
3
+ // `x-sdk-path` OpenAPI extension. This module reads those declared paths from
4
+ // the spec and is the single source of truth shared by the hey-api codegen
5
+ // config (`openapi-ts.config.ts`) and the SDK reference-doc generator
6
+ // (`dx sdk:generate`), so the generated client and its docs can never disagree.
7
+ //
8
+ // There is no heuristic and no per-operation table here — the path comes
9
+ // straight from the decorator. Operations WITHOUT an `x-sdk-path` are not
10
+ // generated at all (that is also how an endpoint is excluded).
11
+ /**
12
+ * camelCase → kebab-case. Shared by the CLI (command + flag names) and the
13
+ * reference-doc generator (CLI example flags) so both spell names identically.
14
+ */
15
+ export function kebab(value) {
16
+ return value.replace(/([a-z0-9])([A-Z])/gu, '$1-$2').toLowerCase();
17
+ }
18
+ const SEGMENT = /^[a-z][A-Za-z0-9]*$/u;
19
+ const HTTP_METHODS = ['get', 'post', 'put', 'patch', 'delete'];
20
+ function isRecord(value) {
21
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
22
+ }
23
+ /**
24
+ * Validate the declared SDK paths: every segment must be a camelCase identifier
25
+ * and no two operations may share the same path. Throws on the first problem —
26
+ * a codegen-time guard against malformed or shadowing routes.
27
+ */
28
+ export function validateSdkPaths(pathsByOperationId) {
29
+ const seen = new Map();
30
+ for (const [operationId, path] of pathsByOperationId) {
31
+ if (path.length === 0) {
32
+ throw new Error(`sdk-ts: operation "${operationId}" has an empty x-sdk-path.`);
33
+ }
34
+ for (const segment of path) {
35
+ if (!SEGMENT.test(segment)) {
36
+ throw new Error(`sdk-ts: operation "${operationId}" has invalid x-sdk-path segment "${segment}" ` +
37
+ '(each segment must be a camelCase identifier).');
38
+ }
39
+ }
40
+ const key = path.join('.');
41
+ const prior = seen.get(key);
42
+ if (prior !== undefined) {
43
+ throw new Error(`sdk-ts: "${operationId}" and "${prior}" both declare rl.${key}(). Change one @SdkRoute.`);
44
+ }
45
+ seen.set(key, operationId);
46
+ }
47
+ }
48
+ /**
49
+ * Scan a parsed OpenAPI spec for opted-in operations and return their declared
50
+ * SDK call paths keyed by operationId. An operation is opted in iff it carries
51
+ * an `x-sdk-path` array (emitted by the backend `@SdkRoute(...)` decorator). The
52
+ * collected paths are validated (unique, valid segments) before returning.
53
+ */
54
+ export function collectSdkPaths(spec) {
55
+ // biome-ignore lint/complexity/useLiteralKeys: spec is Record<string, unknown>; noPropertyAccessFromIndexSignature requires bracket access
56
+ const paths = isRecord(spec) && isRecord(spec['paths']) ? spec['paths'] : {};
57
+ const result = new Map();
58
+ for (const methods of Object.values(paths)) {
59
+ if (!isRecord(methods))
60
+ continue;
61
+ for (const method of HTTP_METHODS) {
62
+ const op = methods[method];
63
+ if (!isRecord(op))
64
+ continue;
65
+ const sdkPath = op['x-sdk-path'];
66
+ // biome-ignore lint/complexity/useLiteralKeys: op is Record<string, unknown>; noPropertyAccessFromIndexSignature requires bracket access
67
+ const operationId = op['operationId'];
68
+ if (!Array.isArray(sdkPath) || typeof operationId !== 'string')
69
+ continue;
70
+ result.set(operationId, sdkPath.filter((segment) => typeof segment === 'string'));
71
+ }
72
+ }
73
+ validateSdkPaths(result);
74
+ return result;
75
+ }
@@ -0,0 +1,15 @@
1
+ import type { DomainId } from './domains.js';
2
+ export type RelatedReference = `concept:${string}` | `recipe:${string}` | `resource:${string}` | `tutorial:${string}`;
3
+ /** Typed metadata for one Explanation page. Markdown supplies optional prose only. */
4
+ export interface ConceptReferenceEntry {
5
+ readonly id: string;
6
+ readonly title: string;
7
+ readonly domain: DomainId;
8
+ readonly related: readonly RelatedReference[];
9
+ }
10
+ /**
11
+ * Authoritative concept registry. A concept exists because it is declared here;
12
+ * an optional `apps/recursion/web/public/docs/concepts/<id>.md` file enriches its rendered
13
+ * body and search text but never controls membership or metadata.
14
+ */
15
+ export declare const CONCEPT_REFERENCE: Readonly<Record<string, ConceptReferenceEntry>>;
@@ -0,0 +1,354 @@
1
+ /**
2
+ * Authoritative concept registry. A concept exists because it is declared here;
3
+ * an optional `apps/recursion/web/public/docs/concepts/<id>.md` file enriches its rendered
4
+ * body and search text but never controls membership or metadata.
5
+ */
6
+ export const CONCEPT_REFERENCE = {
7
+ 'anatomy-of-a-problem-version': {
8
+ id: 'anatomy-of-a-problem-version',
9
+ title: 'Anatomy of a problem version',
10
+ domain: 'problems',
11
+ related: [
12
+ 'concept:problem-lifecycle',
13
+ 'concept:run-config-roles',
14
+ 'resource:problem-versions',
15
+ 'resource:problems',
16
+ ],
17
+ },
18
+ 'authentication-and-access': {
19
+ id: 'authentication-and-access',
20
+ title: 'Authentication and access',
21
+ domain: 'platform',
22
+ related: ['concept:the-permission-model', 'concept:organizations-and-users'],
23
+ },
24
+ computes: {
25
+ id: 'computes',
26
+ title: 'Computes',
27
+ domain: 'run-configs',
28
+ related: [
29
+ 'concept:run-config-anatomy',
30
+ 'concept:snapshot-solvers-on-compute',
31
+ 'resource:computes',
32
+ ],
33
+ },
34
+ 'container-images-and-the-marketplace': {
35
+ id: 'container-images-and-the-marketplace',
36
+ title: 'Container images and the marketplace',
37
+ domain: 'run-configs',
38
+ related: [
39
+ 'concept:computes',
40
+ 'recipe:browse-images-and-models',
41
+ 'resource:images',
42
+ 'resource:marketplace',
43
+ 'resource:models',
44
+ ],
45
+ },
46
+ 'cost-accounting': {
47
+ id: 'cost-accounting',
48
+ title: 'How cost is accounted',
49
+ domain: 'cost',
50
+ related: [
51
+ 'resource:cost-limits',
52
+ 'resource:problem-runs',
53
+ 'resource:evaluations',
54
+ 'concept:cost-limits-and-budgets',
55
+ 'concept:the-cost-explorer',
56
+ ],
57
+ },
58
+ 'cost-limits-and-budgets': {
59
+ id: 'cost-limits-and-budgets',
60
+ title: 'Cost limits and budgets',
61
+ domain: 'cost',
62
+ related: [
63
+ 'recipe:set-a-per-problem-cost-limit',
64
+ 'recipe:set-an-environment-cost-limit',
65
+ 'recipe:remove-a-cost-limit',
66
+ 'resource:cost-limits',
67
+ 'concept:cost-accounting',
68
+ ],
69
+ },
70
+ 'designing-an-evaluation': {
71
+ id: 'designing-an-evaluation',
72
+ title: 'Designing an evaluation',
73
+ domain: 'evaluations',
74
+ related: [
75
+ 'concept:evaluation-vs-problem-run',
76
+ 'recipe:run-an-evaluation',
77
+ 'recipe:export-evaluation-results',
78
+ 'resource:evaluations',
79
+ ],
80
+ },
81
+ 'environment-files': {
82
+ id: 'environment-files',
83
+ title: 'Environment files',
84
+ domain: 'environments',
85
+ related: ['resource:environment-files', 'concept:problem-files', 'resource:environments'],
86
+ },
87
+ 'environment-snapshots-and-duplication': {
88
+ id: 'environment-snapshots-and-duplication',
89
+ title: 'Environment duplication',
90
+ domain: 'integrations',
91
+ related: [
92
+ 'concept:exporting-and-reusing-an-environment',
93
+ 'recipe:export-an-environment',
94
+ 'resource:environments',
95
+ ],
96
+ },
97
+ 'environment-templates-and-defaults': {
98
+ id: 'environment-templates-and-defaults',
99
+ title: 'Environment templates and defaults',
100
+ domain: 'environments',
101
+ related: ['resource:environments', 'resource:run-configs', 'resource:forms'],
102
+ },
103
+ 'evaluation-vs-problem-run': {
104
+ id: 'evaluation-vs-problem-run',
105
+ title: 'Evaluations vs. problem runs',
106
+ domain: 'evaluations',
107
+ related: ['resource:evaluations', 'resource:problem-runs', 'recipe:run-an-evaluation'],
108
+ },
109
+ 'exporting-and-reusing-an-environment': {
110
+ id: 'exporting-and-reusing-an-environment',
111
+ title: 'Exporting and reusing an environment',
112
+ domain: 'environments',
113
+ related: [
114
+ 'recipe:export-an-environment',
115
+ 'concept:environment-templates-and-defaults',
116
+ 'concept:environment-snapshots-and-duplication',
117
+ 'resource:exports',
118
+ 'resource:environments',
119
+ ],
120
+ },
121
+ 'forms-and-structured-capture': {
122
+ id: 'forms-and-structured-capture',
123
+ title: 'Forms and structured capture',
124
+ domain: 'problems',
125
+ related: ['resource:forms', 'resource:form-answers'],
126
+ },
127
+ 'grading-strategies': {
128
+ id: 'grading-strategies',
129
+ title: 'Grading strategies',
130
+ domain: 'review-qa',
131
+ related: [
132
+ 'resource:rubrics',
133
+ 'resource:problem-versions',
134
+ 'recipe:create-and-grade-a-problem',
135
+ 'recipe:grade-with-a-rubric-grader',
136
+ 'recipe:grade-with-an-agentic-grader',
137
+ 'recipe:grade-with-a-programmatic-grader',
138
+ 'recipe:grade-with-a-composite-grader',
139
+ ],
140
+ },
141
+ 'guided-tours': {
142
+ id: 'guided-tours',
143
+ title: 'Guided tours',
144
+ domain: 'authoring-aids',
145
+ related: ['recipe:set-up-a-guided-tour', 'concept:anatomy-of-a-problem-version'],
146
+ },
147
+ 'how-async-work-runs': {
148
+ id: 'how-async-work-runs',
149
+ title: 'How async work runs',
150
+ domain: 'jobs-observability',
151
+ related: [
152
+ 'recipe:run-a-job-and-read-results',
153
+ 'recipe:cancel-a-job',
154
+ 'resource:jobs',
155
+ 'resource:problem-runs',
156
+ 'concept:runs-transcripts-and-results',
157
+ ],
158
+ },
159
+ 'how-grading-works': {
160
+ id: 'how-grading-works',
161
+ title: 'How grading works',
162
+ domain: 'review-qa',
163
+ related: [
164
+ 'concept:grading-strategies',
165
+ 'concept:run-config-roles',
166
+ 'recipe:add-and-refine-a-rubric',
167
+ 'recipe:create-and-grade-a-problem',
168
+ 'resource:rubrics',
169
+ 'resource:rubric-scores',
170
+ ],
171
+ },
172
+ 'human-review-and-issues': {
173
+ id: 'human-review-and-issues',
174
+ title: 'Human review and issues',
175
+ domain: 'review-qa',
176
+ related: ['recipe:submit-and-review-a-problem', 'resource:issues', 'resource:issue-comments'],
177
+ },
178
+ 'importing-problems-and-claiming': {
179
+ id: 'importing-problems-and-claiming',
180
+ title: 'Importing problems and claiming',
181
+ domain: 'problems',
182
+ related: ['recipe:import-problems', 'resource:imports', 'resource:problems'],
183
+ },
184
+ 'interfaces-ui-cli-sdk-api': {
185
+ id: 'interfaces-ui-cli-sdk-api',
186
+ title: 'Interfaces: UI, CLI, SDK, and API',
187
+ domain: 'platform',
188
+ related: ['resource:problems', 'resource:environments'],
189
+ },
190
+ 'monitoring-and-health': {
191
+ id: 'monitoring-and-health',
192
+ title: 'Monitoring and health',
193
+ domain: 'jobs-observability',
194
+ related: ['concept:how-async-work-runs'],
195
+ },
196
+ 'organizations-and-users': {
197
+ id: 'organizations-and-users',
198
+ title: 'Organizations and users',
199
+ domain: 'administration',
200
+ related: [
201
+ 'concept:the-permission-model',
202
+ 'concept:platform-architecture',
203
+ 'concept:cost-accounting',
204
+ 'resource:environments',
205
+ ],
206
+ },
207
+ 'platform-architecture': {
208
+ id: 'platform-architecture',
209
+ title: 'Platform architecture',
210
+ domain: 'platform',
211
+ related: [
212
+ 'concept:problem-lifecycle',
213
+ 'concept:run-config-roles',
214
+ 'concept:how-async-work-runs',
215
+ 'resource:environments',
216
+ 'resource:problems',
217
+ ],
218
+ },
219
+ 'problem-files': {
220
+ id: 'problem-files',
221
+ title: 'Problem files',
222
+ domain: 'problems',
223
+ related: [
224
+ 'recipe:attach-a-file',
225
+ 'recipe:detach-and-download-a-file',
226
+ 'recipe:set-gold-standard-and-tags',
227
+ 'resource:files',
228
+ 'concept:environment-files',
229
+ ],
230
+ },
231
+ 'problem-lifecycle': {
232
+ id: 'problem-lifecycle',
233
+ title: 'The problem lifecycle',
234
+ domain: 'problems',
235
+ related: ['resource:problems', 'resource:problem-versions', 'resource:problem-runs'],
236
+ },
237
+ 'public-environments': {
238
+ id: 'public-environments',
239
+ title: 'Public environments',
240
+ domain: 'integrations',
241
+ related: ['concept:organizations-and-users', 'resource:environments'],
242
+ },
243
+ 'quality-gates-and-qa': {
244
+ id: 'quality-gates-and-qa',
245
+ title: 'Quality gates and QA',
246
+ domain: 'review-qa',
247
+ related: ['recipe:gate-a-stage-on-qa', 'resource:qa', 'resource:qa-gates'],
248
+ },
249
+ 'run-config-anatomy': {
250
+ id: 'run-config-anatomy',
251
+ title: 'Anatomy of a run config',
252
+ domain: 'run-configs',
253
+ related: [
254
+ 'concept:run-config-roles',
255
+ 'concept:verifying-with-the-probe',
256
+ 'concept:secrets-and-credentials',
257
+ 'recipe:configure-a-run-config',
258
+ 'recipe:create-a-claude-code-run-config',
259
+ 'resource:run-configs',
260
+ ],
261
+ },
262
+ 'run-config-roles': {
263
+ id: 'run-config-roles',
264
+ title: 'Run config roles and scopes',
265
+ domain: 'run-configs',
266
+ related: [
267
+ 'concept:snapshot-solvers-on-compute',
268
+ 'resource:run-configs',
269
+ 'recipe:configure-a-run-config',
270
+ 'recipe:bind-a-run-config-to-an-environment',
271
+ ],
272
+ },
273
+ 'runs-transcripts-and-results': {
274
+ id: 'runs-transcripts-and-results',
275
+ title: 'Runs, transcripts, and results',
276
+ domain: 'jobs-observability',
277
+ related: [
278
+ 'recipe:inspect-run-history-and-transcript',
279
+ 'resource:transcripts',
280
+ 'resource:problem-runs',
281
+ 'concept:how-async-work-runs',
282
+ ],
283
+ },
284
+ 'secrets-and-credentials': {
285
+ id: 'secrets-and-credentials',
286
+ title: 'Secrets and credentials',
287
+ domain: 'administration',
288
+ related: [
289
+ 'recipe:attach-a-customer-secret',
290
+ 'concept:run-config-anatomy',
291
+ 'resource:run-configs',
292
+ ],
293
+ },
294
+ 'snapshot-solvers-on-compute': {
295
+ id: 'snapshot-solvers-on-compute',
296
+ title: 'Snapshot solvers and compute runs',
297
+ domain: 'run-configs',
298
+ related: [
299
+ 'concept:run-config-roles',
300
+ 'concept:computes',
301
+ 'concept:grading-strategies',
302
+ 'resource:run-configs',
303
+ 'recipe:create-and-grade-a-problem',
304
+ 'recipe:run-a-job-and-read-results',
305
+ ],
306
+ },
307
+ tags: {
308
+ id: 'tags',
309
+ title: 'Tags',
310
+ domain: 'problems',
311
+ related: ['recipe:set-gold-standard-and-tags', 'resource:problems'],
312
+ },
313
+ 'the-cost-explorer': {
314
+ id: 'the-cost-explorer',
315
+ title: 'The cost explorer',
316
+ domain: 'cost',
317
+ related: ['concept:cost-accounting', 'resource:cost-limits'],
318
+ },
319
+ 'the-permission-model': {
320
+ id: 'the-permission-model',
321
+ title: 'The permission model',
322
+ domain: 'administration',
323
+ related: ['concept:organizations-and-users', 'concept:authentication-and-access'],
324
+ },
325
+ 'the-synthesizer': {
326
+ id: 'the-synthesizer',
327
+ title: 'The synthesizer',
328
+ domain: 'synthesizer',
329
+ related: [
330
+ 'resource:synthesizer',
331
+ 'recipe:improve-a-problem-with-the-synthesizer',
332
+ 'recipe:cancel-a-synthesizer-run',
333
+ 'concept:run-config-roles',
334
+ ],
335
+ },
336
+ 'the-taiga-integration': {
337
+ id: 'the-taiga-integration',
338
+ title: 'The Taiga integration',
339
+ domain: 'integrations',
340
+ related: ['resource:environments', 'resource:jobs'],
341
+ },
342
+ 'verifying-with-the-probe': {
343
+ id: 'verifying-with-the-probe',
344
+ title: 'Verifying a run config with the probe',
345
+ domain: 'run-configs',
346
+ related: ['concept:run-config-roles', 'concept:run-config-anatomy', 'resource:run-configs'],
347
+ },
348
+ 'worldsim-authoring': {
349
+ id: 'worldsim-authoring',
350
+ title: 'Worldsim authoring',
351
+ domain: 'authoring-aids',
352
+ related: ['concept:run-config-anatomy'],
353
+ },
354
+ };
@@ -0,0 +1,65 @@
1
+ export interface Domain {
2
+ /** Stable kebab-case id; the value carried by recipes, concepts, and resource roots. */
3
+ readonly id: string;
4
+ /** Human-facing section label in the docs nav. */
5
+ readonly title: string;
6
+ /** Nav order within How-to / Explanation (ascending). */
7
+ readonly order: number;
8
+ }
9
+ export declare const DOMAINS: readonly [{
10
+ readonly id: "platform";
11
+ readonly title: "Platform & interfaces";
12
+ readonly order: 1;
13
+ }, {
14
+ readonly id: "environments";
15
+ readonly title: "Environments";
16
+ readonly order: 2;
17
+ }, {
18
+ readonly id: "problems";
19
+ readonly title: "Problems";
20
+ readonly order: 3;
21
+ }, {
22
+ readonly id: "authoring-aids";
23
+ readonly title: "Authoring aids";
24
+ readonly order: 4;
25
+ }, {
26
+ readonly id: "run-configs";
27
+ readonly title: "Run configs";
28
+ readonly order: 5;
29
+ }, {
30
+ readonly id: "evaluations";
31
+ readonly title: "Evaluations";
32
+ readonly order: 6;
33
+ }, {
34
+ readonly id: "synthesizer";
35
+ readonly title: "Synthesizer";
36
+ readonly order: 7;
37
+ }, {
38
+ readonly id: "tuning";
39
+ readonly title: "Tuning";
40
+ readonly order: 8;
41
+ }, {
42
+ readonly id: "review-qa";
43
+ readonly title: "Review & QA";
44
+ readonly order: 9;
45
+ }, {
46
+ readonly id: "jobs-observability";
47
+ readonly title: "Jobs & observability";
48
+ readonly order: 10;
49
+ }, {
50
+ readonly id: "cost";
51
+ readonly title: "Cost";
52
+ readonly order: 11;
53
+ }, {
54
+ readonly id: "administration";
55
+ readonly title: "Administration";
56
+ readonly order: 12;
57
+ }, {
58
+ readonly id: "integrations";
59
+ readonly title: "Integrations";
60
+ readonly order: 13;
61
+ }];
62
+ /** Union of the thirteen canonical domain ids. */
63
+ export type DomainId = (typeof DOMAINS)[number]['id'];
64
+ /** Runtime guard: is `value` one of the canonical domain ids? */
65
+ export declare function isDomainId(value: unknown): value is DomainId;
@@ -0,0 +1,32 @@
1
+ // Canonical **product-domain taxonomy** — the single source of truth for the
2
+ // docs information architecture. The How-to (recipes) and Explanation (concepts)
3
+ // quadrants group their entries under these thirteen flat domains; Reference keeps
4
+ // its own deep, spec-derived tree (it is not domain-grouped).
5
+ //
6
+ // Consumed by the frontend docs nav, the `rl` CLI, and the dx generators. The
7
+ // backend cannot import this (the spec → sdk-ts flow is one-way), so the
8
+ // backend `x-docs-resource.domain` stays a plain string and the
9
+ // `resources:generate` membership guard enforces that every value here is a
10
+ // real `DomainId`.
11
+ //
12
+ // Pure data — no dependency. Order is the nav order (top → bottom).
13
+ export const DOMAINS = [
14
+ { id: 'platform', title: 'Platform & interfaces', order: 1 },
15
+ { id: 'environments', title: 'Environments', order: 2 },
16
+ { id: 'problems', title: 'Problems', order: 3 },
17
+ { id: 'authoring-aids', title: 'Authoring aids', order: 4 },
18
+ { id: 'run-configs', title: 'Run configs', order: 5 },
19
+ { id: 'evaluations', title: 'Evaluations', order: 6 },
20
+ { id: 'synthesizer', title: 'Synthesizer', order: 7 },
21
+ { id: 'tuning', title: 'Tuning', order: 8 },
22
+ { id: 'review-qa', title: 'Review & QA', order: 9 },
23
+ { id: 'jobs-observability', title: 'Jobs & observability', order: 10 },
24
+ { id: 'cost', title: 'Cost', order: 11 },
25
+ { id: 'administration', title: 'Administration', order: 12 },
26
+ { id: 'integrations', title: 'Integrations', order: 13 },
27
+ ];
28
+ const DOMAIN_IDS = new Set(DOMAINS.map((d) => d.id));
29
+ /** Runtime guard: is `value` one of the canonical domain ids? */
30
+ export function isDomainId(value) {
31
+ return typeof value === 'string' && DOMAIN_IDS.has(value);
32
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * AUTO-GENERATED by 'yarn dx recipes:generate'.
3
+ * Do not edit manually — changes will be overwritten.
4
+ *
5
+ * Recipe reference, keyed by recipe id. Derived from the declarative
6
+ * recipe folders under `tests/smoke/recipes/`: each step's inputs and
7
+ * captures are statically validated against the SDK reference, then composed
8
+ * into runnable SDK/CLI/cURL examples.
9
+ */
10
+ import type { RecipeReferenceEntry } from './recipes-schema.js';
11
+ export declare const RECIPE_REFERENCE: Record<string, RecipeReferenceEntry>;